Blog

  • PHPickerTutorial-iOS

    PHPickerTutorial-iOS

    πŸͺ“ iOS 14+ PHPickerViewController 섬주섬주섬


    기쑴에 μ§€μ›ν•˜λŠ” UIPickerViewController κ°€ μžˆμ—ˆλŠ”λ°μš”! iOS 14 μ—μ„œ μƒˆλ‘œμš΄ Photo Picker κ°€ λ‚˜μ™”μŠ΄λ‹€!

    Apple Developer Documentation

    자자 개발자 λ¬Έμ„œλ₯Ό μ‚΄νŽ΄λ³΄μžκ΅¬μš”!

    Overview

    PHPickerViewController ν΄λž˜μŠ€λŠ” UIImagePickerController 의 λŒ€μ•ˆμž…λ‹ˆλ‹€. PHPickerViewController λŠ” μ•ˆμ •μ„±κ³Ό 신뒰성을 κ°œμ„ ν•˜κ³  λ‹€μŒκ³Ό 같은 κ°œλ°œμžμ™€ μ‚¬μš©μžμ—κ²Œ 이점을 μ œκ³΅ν•©λ‹ˆλ‹€.

    • Deferred image loading and recovery UI

    μ§€μ—°λœ 이미지 λ‘œλ”©κ³Ό 볡ꡬ UI

    • Reliable handling of large and complex assets, like RAW and panoramic images

    RAW 및 νŒŒλ…ΈλΌλ§ˆ 이미지와 같은 크고 λ³΅μž‘ν•œ μ—μ…‹μ˜ μ•ˆμ •μ μΈ 처

    (RAW λŠ” 이미지 파일 포맷이닀. λ‹€λ₯Έ ν™•μž₯μžλ“€λ³΄λ‹€ 크기가 맀우 ν¬μ§€λ§Œ μ‚¬μ§„νŽΈμ§‘μ— μœ μš©ν•˜λ‹€κ³  ν•œλ‹€. iPhone 12 ν”„λ‘œ 및 ν”„λ‘œλ§₯μŠ€μ—μ„œλΆ€ν„° μ΄¬μ˜κ°€λŠ₯.)

    • User-selectable assets that aren’t available forΒ UIImagePickerController

    UIImagePickerController 에 μ‚¬μš©ν•  수 μ—†λŠ” μ‚¬μš©μžμ„ νƒ κ°€λŠ₯ν•œ 에셋

    • Configuration of the picker to display only Live Photos

    Live Photos 만 ν‘œμ‹œν•˜λŠ” picker ꡬ성

    • Availability ofΒ PHLivePhotoΒ objects without library access

    라이브러리 μ•‘μ„ΈμŠ€ 없이 PHLivePhoto(Live Photo) 객체 μ‚¬μš©κ°€λŠ₯

    • Stricter validations against invalid inputs

    μœ νš¨ν•˜μ§€ μ•ŠλŠ” μž…λ ₯에 λŒ€ν•œ 더 μ—„κ²©ν•œ 검증

    μ΄λ ‡κ²Œ λ³΄λ‹ˆκΉŒ κΈ°λŠ₯λ©΄μ—μ„œ 무엇이 ν™•μ‹€νžˆ λ‹€λ₯Έμ§€ λͺ¨λ₯΄κ² λŠ”λ°μš”! λ§Œλ“€μ–΄λ³΄κΈ°μ „μ— λ¨Όμ € μ†Œκ°œν•΄λ³΄κ² μŠ΅λ‹ˆλ‹€!

    • multiple select
    • zoom in or out
    • search
    • κΆŒν•œ μš”μ²­ νŒμ—…μ΄ λœ¨μ§€ μ•ŠλŠ”λ‹€.

    μ—„μ²­..λ‚˜μ§€ μ•Šλ‚˜μš”..? 휘λ‘₯그레

    좜발

    1. import PhotosUI

    import PhotosUI

    2. Create PHPickerConfiguration

    : picker 뷰컨트둀러λ₯Ό κ΅¬μ„±ν•˜λŠ” 정보λ₯Ό ν¬ν•¨ν•œ κ°μ²΄μž…λ‹ˆλ‹€.

    이 객체둜 μ œμ–΄ ν•  수 μžˆλŠ”λ° κ·Έ μ’…λ₯˜λ₯Ό μ•Œμ•„λ³΄μž!

    var configuration = PHPickerConfiguration()
    // πŸŽ† selectionLimit
    // πŸŽ† μœ μ €κ°€ 선택할 수 μžˆλŠ” μ—μ…‹μ˜ μ΅œλŒ€ 갯수. κΈ°λ³Έκ°’ 1. 0 μ„€μ •μ‹œ μ œν•œμ€ μ‹œμŠ€ν…œμ΄ μ§€μ›ν•˜λŠ” μ΅œλŒ€κ°’μœΌλ‘œ μ„€μ •.
    configuration.selectionLimit = 1
    
    // πŸŽ† filter
    // πŸŽ† picker κ°€ ν‘œμ‹œν•˜λŠ” 에셋 νƒ€μž… μ œν•œμ„ 적용. 기본적으둜 λͺ¨λ“  에셋 μœ ν˜•μ„ ν‘œμ‹œ(이미지, λΌμ΄λΈŒν¬ν† , λΉ„λ””μ˜€)
    configuration.filter = .images
    // configuration.filter = .any(of: [.images, .livePhotos, .videos])

    3. Initialize PHPicker

    λ§Œλ“  PHPickerConfiguration 을 κ°€μ§€κ³  PHPickerViewController λ₯Ό λ§Œλ“€μ–΄μ•Ό ν•©λ‹ˆλ‹€.

    let picker = PHPickerViewController(configuration: configuration)

    4. PHPickerViewControllerDelegate

    UIImagePickerController 도 μ„ νƒν•˜κ³  didFinishPickingMediaWithInfo λ©”μ„œλ“œλ‘œ μ„ νƒν•œ λ―Έλ””μ–΄μ˜ 정보λ₯Ό κ°€μ Έμ™”λŠ”λ° PHPicker 도 λ™μΌν•œ 역할이 μžˆλ‹€.

    // πŸŽ† μœ μ €κ°€ 선택을 μ™„λ£Œν–ˆκ±°λ‚˜ μ·¨μ†Œ λ²„νŠΌμœΌλ‘œ λ‹«μ•˜μ„ λ•Œ μ•Œλ €μ£ΌλŠ” delegate
    extension ViewController: PHPickerViewControllerDelegate {
        // πŸŽ† required method
        func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
            // ...
        }
    }

    PHPickerViewControllerDelegate 을 채택해주고 μ—­μ‹œλ‚˜ picker.delegate = self μ„€μ •ν•΄μ£Όμ–΄μ•Ό ν•œλ‹€.

    5. Present Picker

    이제 피컀λ₯Ό 뷰에 λ„μ–΄λ΄…μ‹œλ‹€! μ•„λž˜λŠ” 전체 μ½”λ“œμž…λ‹ˆλ‹€.

    class ViewController: UIViewController {
    
        override func viewDidLoad() {
            super.viewDidLoad()
            
            var configuration = PHPickerConfiguration()
            // πŸŽ† The maximum number of selections the user can make.
            // πŸŽ† κΈ°λ³Έκ°’ 1. 0 μ„€μ •μ‹œ μ œν•œμ€ μ‹œμŠ€ν…œμ΄ μ§€μ›ν•˜λŠ” μ΅œλŒ€κ°’μœΌλ‘œ μ„€μ •.
            configuration.selectionLimit = 2
            
            // πŸŽ† The filter you apply to restrict the asset types the picker displays.
            // πŸŽ† 기본적으둜 이미지(λΌμ΄λΈŒν¬ν†  포함), λΌμ΄λΈŒν¬ν† , λΉ„λ””μ˜€μ™€ 같은 λͺ¨λ“  μ—μ…‹νƒ€μž… ν‘œμ‹œ.
            configuration.filter = .images
    //        configuration.filter = .any(of: [.images, .livePhotos, .videos])
            
            let picker = PHPickerViewController(configuration: configuration)
            picker.delegate = self
            
            self.present(picker, animated: true, completion: nil)
        }
    }
    
    // πŸŽ† μœ μ €κ°€ 선택을 μ™„λ£Œν–ˆκ±°λ‚˜ μ·¨μ†Œ λ²„νŠΌμœΌλ‘œ λ‹«μ•˜μ„ λ•Œ μ•Œλ €μ£ΌλŠ” delegate
    extension ViewController: PHPickerViewControllerDelegate {
        // πŸŽ† required method
        func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
            // ...
        }
    }

    6. Handling assets

    이제 μ„ νƒν•œ 에셋듀을 λ‹€λ£¨μ–΄λ³΄κ² μŠ΅λ‹ˆλ‹€.

    delegate μ—μ„œ νŒŒλΌλ―Έν„° results λ₯Ό μ‚¬μš©ν•˜λ©΄λœλ‹΅λ‹ˆλ‹€!

    • PHPickerResult : μ„ νƒλœ 에셋을 λ‚˜νƒ€λ‚΄λŠ” νƒ€μž….
    • itemProvider: NSItemProvider. μ„ νƒλœ μ—μ…‹μ˜ respresentation.
    extension ViewController: PHPickerViewControllerDelegate {
        func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
            // πŸŽ† μ„ νƒμ™„λ£Œ ν˜Ήμ€ μ·¨μ†Œν•˜λ©΄ λ·° dismiss.
            picker.dismiss(animated: true, completion: nil)
            
            // πŸŽ† itemProvider λ₯Ό κ°€μ Έμ˜¨λ‹€.
            let itemProvider = results.first?.itemProvider
            if let itemProvider = itemProvider,
               // πŸŽ† itemProvider μ—μ„œ μ§€μ •ν•œ νƒ€μž…μœΌλ‘œ λ‘œλ“œν•  수 μžˆλŠ”μ§€ 체크
               itemProvider.canLoadObject(ofClass: UIImage.self) {
                // πŸŽ† loadObject() λ©”μ„œλ“œλŠ” completionHandler 둜 NSItemProviderReading κ³Ό error λ₯Ό μ€€λ‹€.
                itemProvider.loadObject(ofClass: UIImage.self) { image, error in
                    // πŸŽ† itemProvider λŠ” background asnyc μž‘μ—…μ΄κΈ° λ•Œλ¬Έμ— UI 와 κ΄€λ ¨λœ μ—…λ°μ΄νŠΈλŠ” κΌ­ main μ“°λ ˆλ“œμ—μ„œ μ‹€ν–‰ν•΄μ€˜μ•Ό ν•©λ‹ˆλ‹€.
                    DispatchQueue.main.sync {
                        self.myImageView.image = image as? UIImage
                    }
                }
            }
        }
    }

    7. Multiple selection Handling

    λ‹€μŒκ³Ό 같이 PHPickerResult λ°°μ—΄μ—μ„œ κΊΌλ‚΄μ£Όλ©΄ λœλ‹€.

        func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
            picker.dismiss(animated: true, completion: nil)   
        
            let itemFirstProvider = results[0].itemProvider
            let itemSecondProvider = results[1].itemProvider
            
            if itemFirstProvider.canLoadObject(ofClass: UIImage.self) {
                itemFirstProvider.loadObject(ofClass: UIImage.self) { image, error in
                    DispatchQueue.main.sync {
                        self.myFirstImageView.image = image as? UIImage
                    }
                }
            }
            
            if itemSecondProvider.canLoadObject(ofClass: UIImage.self) {
                itemSecondProvider.loadObject(ofClass: UIImage.self) { image, error in
                    DispatchQueue.main.sync {
                        self.mySecondImageView.image = image as? UIImage
                    }
                }
            }
        }

    κ²°κ³Ό

    좜처 :

    iOS 14+ ) PHPicker

    Visit original content creator repository https://github.com/hyun99999/PHPickerTutorial-iOS
  • mingw-w64-ksocket

    Mingw64 Kernel Sockets

    Requires mingw-w64-dpp and Windows 10. Windows 11 may or may not work, not tested yet.

    Did you ever ask yourself the question: how-the-hell can I open a socket in kernel mode with a Mingw-w64 compiled driver?
    Well, this is the solution. mingw-w64-ksocket simplifies the use of stream/datagram client/server sockets.
    The API is similiar to the BSD socket API.
    Greetings to KSOCKET for this sweet approach.

    Compatible with C and C++ drivers.

    HowTo

    Build it:

    make DPP_ROOT="[path-to-mingw-w64-dpp-template-dir]" all
    

    To install & (self-)sign the driver:

    make DPP_ROOT="[path-to-mingw-w64-dpp-template-dir]" DESTDIR="[path-to-install-dir]" install

    The directory [path-to-install-dir] should now contain three new files:

    • driver.bat / driver-protobuf-c.bat / driver-protobuf-c-tcp.bat: setup the driver service, start it, stop it when it’s done and delete it
    • driver.sys: example driver that uses kernel sockets (used together with userspace_client.exe)
    • userspace_client.exe: example userspace application which communicates with the driver via TCP
    • driver-protobuf-c.sys: example driver that make use of protobuf-c (local, no TCP/IP)
    • driver-protobuf-c-tcp.sys: example driver that make use of protobuf-c via TCP/IP (used together with userspace_client_protobuf.exe)
    • userspace_client_protobuf.exe: example userspace application which leverages protocol buffers to communicate with the driver via TCP

    Start *.bat as Administrator.

    If everything works fine, there should be a text displayed in userspace_client.exe / userspace_client_protobuf.exe console window, received from the driver.

    For more debug output, it is recommended to use a debugger or log viewer like dbgview.

    Visit original content creator repository
    https://github.com/utoni/mingw-w64-ksocket

  • functions-random

    NPM version Build Status Coverage Status

    @dizmo/functions-random

    Attaches to the String type a random function which returns a random string for the provided number of bytes and encoding with ascii, base64, hex, latin1 and ucs2 as possible values. By default the number of bytes is 16 and the default encoding is hex.

    Usage

    Install

    npm install @dizmo/functions-random --save

    Require

    const { random } = require('@dizmo/functions-random');

    Examples

    random(16);
    2fa6651ce3680dd13899156f9550ec61
    random(16, 'hex');
    d00e24ae8348004bca2f9c07ba6ae43b
    random(16, 'ascii');
    lZq\x01\x07j\x17:OnlG9u[\x13
    random(16, 'base64');
    QbqxfgF3JBiCktUQl+p9lQ==
    random(16, 'latin1');
    ؼ\x8D\x9F*>\nØ\x83BÃÑë{\x15Ð
    random(16, 'ucs2');
    β˜”ζˆ δ°β§—ηΊλ°„δ―—ζ™‘

    Development

    Clean

    npm run clean

    Build

    npm run build

    without linting and cleaning:

    npm run -- build --no-lint --no-clean

    with UMD bundling (incl. minimization):

    npm run -- build --prepack

    with UMD bundling (excl. minimization):

    npm run -- build --prepack --no-minify

    Lint

    npm run lint

    with auto-fixing:

    npm run -- lint --fix

    Test

    npm run test

    without linting, cleaning and (re-)building:

    npm run -- test --no-lint --no-clean --no-build

    Cover

    npm run cover

    without linting, cleaning and (re-)building:

    npm run -- cover --no-lint --no-clean --no-build

    Documentation

    npm run docs

    Publish

    npm publish

    initially (if public):

    npm publish --access=public

    Copyright

    Β© 2020 dizmo AG, Switzerland

    Visit original content creator repository https://github.com/dizmo/functions-random
  • rsql

    RSQL / FIQL tools

    Complete and thoroughly tested parser for RSQL/FIQL written in Typescript(Javascript).
    Tools to work with RSQL: matcher, filter, converter to SQL.
    Built with zero dependencies.

    Installing

    npm install @mw-experts/rsql

    or

    yarn add @mw-experts/rsql

    Usage

    Import library

    Import library as CommonJS module:

    const rsql = require('@mw-experts/rsql');
    

    Import library as ES6 module:

    import { RsqlMatcher } from '@mw-experts/rsql';
    import { RsqlFilter } from '@mw-experts/rsql';
    import { RsqlToSqlConverter } from '@mw-experts/rsql';
    

    or

    import * as rsql from '@mw-experts/rsql';
    

    Import library as standalone script in a browser:

    <script src="https://github.com/node_modules/@mw-experts/rsql/dist/rsql-browser.js"></script>
    

    About RSQL / FIQL

    RSQL is a query language for parametrized filtering of entries in RESTful APIs.

    It’s based on FIQL (Feed Item Query Language)
    an URI-friendly syntax for expressing filters across the entries in an Atom Feed.

    The simplicity of RSQL and its capability to express complex queries in a compact and HTTP URI-friendly way
    makes it a good candidate for becoming a generic query language for searching REST endpoints.

    For example, you can query your resource like this:

    /movies?search=name=="Kill Bill";year=gt=2003

    or

    /movies?search=director.lastName==Nolan and year>=2000.

    RSQL introduces simple and composite operators which can be used to build basic and complex queries.

    Basic operators:

    Basic Operator Description
    == Equal To
    != Not Equal To
    =gt= Greater Than
    > Greater Than
    =ge= Greater Or Equal To
    >= Greater Or Equal To
    =lt= Less Than
    < Less Than
    =le= Less Or Equal To
    <= Less Or Equal To
    =in= In
    =out= Not in
    =includes-all= Includes all
    =includes-one= Includes one

    These operators can be used to do all sort of simple queries, for example:

    • name==Fero: find all people whose name is Fero
    • street!=Darna: find all people who do not live at Darna
    • age=gt=10: find all people older than 10 (exclusive)
    • age>10: find all people older than 10 (exclusive)
    • age=ge=10: find all people older than 10 (inclusive)
    • age>=10: find all people older than 10 (inclusive)
    • house=lt=3: find all people who have less than 3 houses
    • house<3: find all people who have less than 3 houses
    • house=le=3: find all people who have less than or 3 houses
    • house<=3: find all people who have less than or 3 houses
    • name=in=(Fero,Jane) find all people whose name is Fero or Jane
    • name=out=(Alex,Mike) find all people whose name is not Alex or Mike
    • list=includes-all=(item1,item2) find all records where list is array and includes item1 and item2
    • list=includes-one=(item1,item2) find all records where list is array and includes item1 or item2

    Composite operators:

    Composite Operator Description
    ; Logical AND
    and Logical AND
    , Logical OR
    or Logical OR

    These operators can be used to join the simple queries and build more involved queries which can be as complex as required.
    Here are some examples:

    • age=gt=10;age=lt=20: find all people older than 10 and younger than 20
    • age=gt=10 and age=lt=20: find all people older than 10 and younger than 20
    • age=lt=5,age=gt=30: find all people younger than 5 or older than 30
    • age<5 or age>30: find all people younger than 5 or older than 30
    • age=gt=10;age=lt=20;name=in=(Fero,Jane): find all people older than 10 and younger than 20 with names either Fero or Jane.

    Fields and Values

    Fields can only consist of next regexp symbols: [\w-.] (A-Za-z0-9_-.)

    • field.name==value
    • field-name==value
    • field_name==value
    • FieldName==value
    • FIELD_NAME_777==value

    Values can only consist of next regexp symbols:

    • in double quotes – space, any unicode letter, any unicode number, _, -, ., ', (, )
    • in single quotes – space, any unicode letter, any unicode number, _, -, ., ", (, )
    • without quotes – any unicode letter, any unicode number, _, -, .
    • with == or != operators you can also use asterisk * as a wildcard

    Ordering

    By default, operators evaluated from left to right.
    However, a parenthesized expression can be used to change the precedence.

    • age=lt=20;(name==Fero,name==Jane): find all people younger than 20 with names either Fero or Jane.

    Convert RSQL to SQL

    const rsqlStr = 'name=="Kill Bill",year=ge=2000';
    let result;
    
    try {
      result = rsql.RsqlToSqlConverter.getInstance().convert(rsqlStr);
    } catch (e) {
      console.warn(e);
    }
    
    console.log(result);
    
    // will output:
    // ("name" = 'Kill Bill' OR "year" >= '2000')
    

    You can have different field names wrapper, for example if you use Mysql.
    Just pass a second argument to convert method like this:

    const rsqlStr = 'name=="Kill Bill",year=ge=2000';
    let result;
    
    try {
      result = rsql.RsqlToSqlConverter.getInstance().convert(rsqlStr, '`');
    } catch (e) {
      console.warn(e);
    }
    
    console.log(result);
    
    // will output:
    // (`name` = 'Kill Bill' OR `year` >= '2000')
    
    • “=includes-all=”, “=includes-one=” operators are not supported in RsqlToSqlConverter
    • Not included in browser bundle

    Filter array of objects

    const data = [
      { name: 'Kill Bill', year: 2006 },
      { name: 'Terminator', year: 1998 },
      { name: 'Matrix', year: 2000 },
    ];
    
    const rsqlStr = 'name=="Kill Bill",year=ge=2000';
    let result = [];
    
    try {
      result = rsql.RsqlFilter.getInstance().filter(rsqlStr, data);
    } catch (e) {
      console.warn(e);
    }
    
    console.log(result);
    
    // will output:
    // [
    //  { name: 'Kill Bill', year: 2006 },
    //  { name: 'Matrix', year: 2000 },
    // ]
    

    You can ask for deep nested properties using dot separator – someObj.prop, or array notation – someList[0].prop:

    const data = [
        {
            deep: {
                nested: {
                    field: 777
                }
            },
            list: [1, 2, 3]
        }
    ]
    
    const rsql = 'deep.nested.field==777';
    const rsql = 'list[1]==2';
    

    Match item

    const data = { name: 'Matrix', year: 2000 };
    
    const rsqlStr = 'name=="Kill Bill";year=ge=2000';
    
    try {
      result = rsql.RsqlMatcher.getInstance().match(rsqlStr, data);
    } catch (e) {
      console.warn(e);
    }
    
    console.log(result);
    
    // will output: false
    

    Value part of matching expression also can be used as path to value, example:

    const data = [
        {
            deep: {
                nested: {
                    field: 2
                }
            },
            list: [1, 2, 3]
        }
    ]
    
    const rsqlStr = 'deep.nested.field==list[1]';
    
    try {
      result = rsql.RsqlMatcher.getInstance().match(rsqlStr, data);
    } catch (e) {
      console.warn(e);
    }
    
    console.log(result);
    
    // will output: true
    

    Match many items

    typescript version:

    const rsqlStr = 'name=="Kill Bill";year=ge=2000';
    
    const tokens: Token<RsqlTokenType>[] = RsqlTokenizer.getInstance().tokenize(rsqlStr);
    const ast: RsqlAstRootNode = RsqlParser.getInstance().parse(tokens);
    const matcher: RsqlMatcher = RsqlMatcher.getInstance();
    
    try {
      result1 = matcher.matchWithPreparedAst(ast, { name: 'Matrix', year: 2000 });
      result2 = matcher.matchWithPreparedAst(ast, { name: 'Kill Bill', year: 2021 });
    } catch (e) {
      console.warn(e);
    }
    
    console.log(result1);
    // will output: false
    
    console.log(result2);
    // will output: true
    

    javascript version:

    const rsqlStr = 'name=="Kill Bill";year=ge=2000';
    
    const tokens = rsql.RsqlTokenizer.getInstance().tokenize(rsqlStr);
    const ast = rsql.RsqlParser.getInstance().parse(tokens);
    const matcher = rsql.RsqlMatcher.getInstance();
    
    try {
      result1 = matcher.matchWithPreparedAst(ast, { name: 'Matrix', year: 2000 });
      result2 = matcher.matchWithPreparedAst(ast, { name: 'Kill Bill', year: 2021 });
    } catch (e) {
      console.warn(e);
    }
    
    console.log(result1);
    // will output: false
    
    console.log(result2);
    // will output: true
    

    Filter and Matcher is case-insensitive

    • name==Marina and name==marina will give the same results – Marina, marina

    Usage of wildcard

    You can use wildcard * in == and != operators. Example:

    • name==Ma* find all items where name starts from Ma – Marina, Maxim, Maria
    • value==*de* find all items where value starts and ends with any symbols – Made, abcdefg

    Comparison rules:

    • “==”, “!=” before comparison data converts to string
    • “=gt=”, “>”, “=ge=”, “>=”, “=lt=”, “<“, “=le=”, “<=” before comparison data converts to number
    • “=in=”, “=out=” before comparison data converts to string
    • “=includes-all=”, “=includes-one=” before comparison data converts to array of strings

    Authors

    License

    This project is licensed under the MIT License – see the LICENSE.md file for details

    Visit original content creator repository
    https://github.com/mw-experts/rsql

  • be_orderingfood

    Laravel Logo

    Build Status Total Downloads Latest Stable Version License

    About Laravel

    Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

    Laravel is accessible, powerful, and provides tools required for large, robust applications.

    Learning Laravel

    Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

    You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.

    If you don’t feel like reading, Laracasts can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

    Laravel Sponsors

    We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Partners program.

    Premium Partners

    Contributing

    Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

    Code of Conduct

    In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

    Security Vulnerabilities

    If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

    License

    The Laravel framework is open-sourced software licensed under the MIT license.

    Visit original content creator repository https://github.com/alisza29/be_orderingfood
  • openshift4-docs

    APPUiO Managed OpenShift 4 Documentation

    This repository contains all the content of the APPUiO Managed OpenShift 4 documentation hosted at https://kb.vshn.ch/oc4/.

    The content is written in AsciiDoc and rendered using Antora.

    Tip

    Documentation structure

    The documentation structure is inspired by the Divio’s documentation structure:

    Tutorials (Learning-oriented)

    A lesson which teaches you something.
    Location: docs/modules/ROOT/pages/tutorials.

    How-to guides (Problem-oriented)

    Step-by-step guides to achieve a goal. Location: docs/modules/ROOT/pages/how-tos.

    Technical reference (Information-oriented)

    Description about the inner ongoings. Location: docs/modules/ROOT/pages/tutorials.

    Explanation (Understanding-oriented)

    Explains the background. Location: docs/modules/ROOT/pages/explanations.

    Contributing

    Create a new branch to make the changes. After you’re satisfied with the changes open a Pull Request against the master branch.

    Previewing Changes

    To preview your changes locally, make sure you have Docker or Podman installed.

    Just type make preview and open your browser at http://localhost:2020. This even provides support for live reload when working on the content. See this documentation for more information about it.

    Adding a New Page

    1. Create new AsciiDoc (.adoc) file in the best matching folder according to the described structure under docs/modules/ROOT/pages/.

    2. Add the file to the navigation under docs/modules/ROOT/partials/

    For removing pages just do the opposite: Remove the file and remove the entry in the navigation.

    Deployment

    This repository only holds Antora content, no plumbing and tooling (aka the Antora playbook.yml and Dockerfile) to build and deploy it.
    All pushes to the master branch trigger a GitHub action (.github/worflows/triggerci.yml) which in turn triggers the GitLab CI job to build and deploy the content using Antora.

    Visit original content creator repository
    https://github.com/appuio/openshift4-docs

  • protectedroute_reactrouterdom_v6

    Getting Started with Create React App

    This project was bootstrapped with Create React App.

    Available Scripts

    In the project directory, you can run:

    npm start

    Runs the app in the development mode.
    Open http://localhost:3000 to view it in your browser.

    The page will reload when you make changes.
    You may also see any lint errors in the console.

    npm test

    Launches the test runner in the interactive watch mode.
    See the section about running tests for more information.

    npm run build

    Builds the app for production to the build folder.
    It correctly bundles React in production mode and optimizes the build for the best performance.

    The build is minified and the filenames include the hashes.
    Your app is ready to be deployed!

    See the section about deployment for more information.

    npm run eject

    Note: this is a one-way operation. Once you eject, you can’t go back!

    If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

    Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

    You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

    Learn More

    You can learn more in the Create React App documentation.

    To learn React, check out the React documentation.

    Code Splitting

    This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

    Analyzing the Bundle Size

    This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

    Making a Progressive Web App

    This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

    Advanced Configuration

    This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

    Deployment

    This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

    npm run build fails to minify

    This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

    Visit original content creator repository
    https://github.com/sridharrajaram/protectedroute_reactrouterdom_v6

  • protectedroute_reactrouterdom_v6

    Getting Started with Create React App

    This project was bootstrapped with Create React App.

    Available Scripts

    In the project directory, you can run:

    npm start

    Runs the app in the development mode.
    Open http://localhost:3000 to view it in your browser.

    The page will reload when you make changes.
    You may also see any lint errors in the console.

    npm test

    Launches the test runner in the interactive watch mode.
    See the section about running tests for more information.

    npm run build

    Builds the app for production to the build folder.
    It correctly bundles React in production mode and optimizes the build for the best performance.

    The build is minified and the filenames include the hashes.
    Your app is ready to be deployed!

    See the section about deployment for more information.

    npm run eject

    Note: this is a one-way operation. Once you eject, you can’t go back!

    If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

    Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

    You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

    Learn More

    You can learn more in the Create React App documentation.

    To learn React, check out the React documentation.

    Code Splitting

    This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

    Analyzing the Bundle Size

    This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

    Making a Progressive Web App

    This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

    Advanced Configuration

    This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

    Deployment

    This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

    npm run build fails to minify

    This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

    Visit original content creator repository
    https://github.com/sridharrajaram/protectedroute_reactrouterdom_v6

  • ciscopykit

    logo

    ciscopykit

    ciscopykit is a Python package designed to automate the generation of Cisco IOS commands and provide an easy way to track device configurations. It offers functionalities organized into various subpackages, each focusing on a specific aspect of network management. This README aims to provide an overview of the package structure and its functionalities.

    Features

    • Device Management: The device module facilitates device management tasks such as adding, removing, modifying, and listing Cisco devices.
    • Interface Configuration: The interface module handles interface management, allowing users to assign and remove IP addresses for network interfaces.
    • Services Configuration: The services subpackage contains modules for configuring DHCP and PAT services on network devices.
    • Switch Settings: The switch subpackage provides functions to generate and configure switch settings.
    • VLAN Configuration: The vlan subpackage offers functionalities to generate and configure VLAN and VTP settings.
    • LAN Security: The lan_security subpackage includes modules for LAN security features, covering switchport security, VLAN security, DHCP snooping, dynamic ARP inspection, and STP security.
    • Routing Configuration: The routing subpackage contains modules for configuring static and dynamic routing protocols.

    Directory Structure

    ciscopykit/
    β”œβ”€β”€ app.py
    β”œβ”€β”€ device.py
    β”œβ”€β”€ entry_point.py
    β”œβ”€β”€ etherchannel
    β”‚   β”œβ”€β”€ cli.py
    β”‚   β”œβ”€β”€ etherchannel.py
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   └── README.md
    β”œβ”€β”€ help
    β”‚   β”œβ”€β”€ demo.py
    β”‚   β”œβ”€β”€ device.md
    β”‚   └── help.md
    β”œβ”€β”€ __init__.py
    β”œβ”€β”€ interface.py
    β”œβ”€β”€ ip
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”œβ”€β”€ README.md
    β”‚   └── vlsm.py
    β”œβ”€β”€ README.md
    β”œβ”€β”€ routing
    β”‚   β”œβ”€β”€ app.py
    β”‚   β”œβ”€β”€ dynamic_routing.py
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”œβ”€β”€ README.md
    β”‚   └── static_routing.py
    β”œβ”€β”€ security
    β”‚   β”œβ”€β”€ acl
    β”‚   β”‚   β”œβ”€β”€ acl.py
    β”‚   β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”‚   └── README.md
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   └── lan_security
    β”‚       β”œβ”€β”€ app.py
    β”‚       β”œβ”€β”€ dhcp_snooping.py
    β”‚       β”œβ”€β”€ dynamic_arp_inspection.py
    β”‚       β”œβ”€β”€ __init__.py
    β”‚       β”œβ”€β”€ README.md
    β”‚       β”œβ”€β”€ stp_security.py
    β”‚       β”œβ”€β”€ switchport_security.py
    β”‚       β”œβ”€β”€ vlan_security.py
    β”‚       └── wiki.md
    β”œβ”€β”€ services
    β”‚   β”œβ”€β”€ app.py
    β”‚   β”œβ”€β”€ dhcp_service.py
    β”‚   β”œβ”€β”€ help.md
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”œβ”€β”€ pat_service.py
    β”‚   └── wiki.md
    β”œβ”€β”€ switch
    β”‚   β”œβ”€β”€ app.py
    β”‚   β”œβ”€β”€ help.md
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”œβ”€β”€ l2_switch.py
    β”‚   β”œβ”€β”€ l3_switch.py
    β”‚   β”œβ”€β”€ switch.py
    β”‚   └── wiki.md
    β”œβ”€β”€ templates
    β”‚   β”œβ”€β”€ generate_router_config.py
    β”‚   β”œβ”€β”€ logo.svg
    β”‚   β”œβ”€β”€ placeholder.txt
    β”‚   └── README.md
    β”œβ”€β”€ vlan
    β”‚   β”œβ”€β”€ app.py
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”œβ”€β”€ README.md
    β”‚   β”œβ”€β”€ vlan.py
    β”‚   └── wiki.md
    └── vpn
        β”œβ”€β”€ dmvpn
        β”‚   β”œβ”€β”€ dmvpn.py
        β”‚   β”œβ”€β”€ __init__.py
        β”‚   └── README.md
        β”œβ”€β”€ gre
        β”‚   β”œβ”€β”€ gre.py
        β”‚   β”œβ”€β”€ __init__.py
        β”‚   └── README.md
        └── README.md
    
    

    Getting Started

    To install ciscopykit, you can use pip:

    pip install ciscopykit

    Contribution

    Contributions to ciscopykit are welcome! If you have any ideas, enhancements, or bug fixes, feel free to open an issue or submit a pull request on GitHub.

    License

    This project is licensed under the MIT License – see the LICENSE.md file for details.

    Visit original content creator repository https://github.com/Vincent-de-Torres-Portfolio/ciscopykit
  • ZoneMinder

    If you got redirected here it’s because ZoneMinder devs have censored my name and the title Shinobi.

    On their forums moeiscool is replaced with moeisnotcool and Shinobi is replaced with zoneminder.

    Edit: Shinobi now filters to yahoo. Which is pretty funny πŸ˜€

    Shinobi Github Page

    Shinobi

    YouTubeSlackTwitterFacebookRedditDonate

    Shinobi is the Open Source CCTV platform written in Node.JS. Designed with multiple account system, Streams by WebSocket, and Save to WebM. Shinobi can record IP Cameras and Local Cameras.

    Yes. I am saying it’s the platform. It will hopefully be revered like WordPress and Magento in their respective sectors… Hopefully better.

    Key Aspects

    • Records IP Cameras and Local Cameras
    • Streams by WebSocket, HLS (includes audio), and MJPEG
    • Save to WebM and MP4
      • Can save Audio
    • API
      • Get videos
      • Get monitors
      • Change monitor modes : Disabled, Watch, Record
      • Embedding streams

    Help make Shinobi the best Open Source CCTV Solution.

    If you like Shinobi please check out some ways you can help Support Shinobi.

    $5 from each person that visits the github page would be enough. Currently all hours spent on Shinobi are entirely voluntary. There is no income from sharing this program with you, so all support means a great deal.

    Just a side note: Patreon is the best way to donate πŸ™‚

    Why make this?

    https://github.com/moeiscool/Shinobi/wiki#why-make-this-other-solutions-already-exist

    More about Shinobi in the Wiki

    https://github.com/moeiscool/Shinobi/wiki

    Supported Cameras

    https://github.com/moeiscool/Shinobi/wiki/Supported-Cameras

    Supported Systems

    https://github.com/moeiscool/Shinobi/wiki/Supported-Systems

    How to Install and Run

    Installation Tutorials

    Troubleshooting Guide

    Author

    Moe Alam

    Follow me on Twitter https://twitter.com/moe_alam

    Credits

    If you wish to use this software for commercial purposes please consider donating πŸ™‚ If not.. including my name would be nice.

    Shinobi
    Copyright (C) 2016-2025 Moe Alam, moeiscool
    
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    # Libraries Used
    
    vbox.css (Classic Dashboard) - An unknown but seriously awesome dev
    Material Design Lite (V2 Dashboard) - https://github.com/google/material-design-lite
    jQuery - http://jquery.com/
    Socket.io - http://socket.io/
    Bootstrap - http://getbootstrap.com/
    Moment.js - http://momentjs.com/
    Livestamp.js - https://mattbradley.github.io/livestampjs/
    Font Awesome - http://fontawesome.io/
    Node.js - https://nodejs.org
    MySQL - https://www.mysql.com/
    NPM: mysql - https://www.npmjs.com/package/mysql
    NPM: crypto - https://www.npmjs.com/package/crypto
    NPM: express - http://expressjs.com/
    NPM: request - https://www.npmjs.com/package/request
    NPM: connection-tester - https://www.npmjs.com/package/connection-tester
    
    and maybe a few others.
    
    Visit original content creator repository https://github.com/moeisnotcool/ZoneMinder