npm list -g –depth 0
Category: Coding
How to add your repo branch to npm proj
npm i –save github:frank10gm/react-native-material-textfield#bugfix/proptypes-deprecation
Nginx configuration
nginx.conf user francesco staff; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main ‘$remote_addr – $remote_user [$time_local] “$request” ‘ ‘$status $body_bytes_sent “$http_referer” ‘ ‘”$http_user_agent” “$http_x_forwarded_for”‘; access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; include /usr/local/etc/nginx/sites-enabled/*.conf; } [windows] nginx.conf #user nobody; worker_processes 1; error_log logs/error.log;… Continue reading Nginx configuration
CRC16 in big endian order
// CRC16 in big endian order const crcArr = new Uint8Array(2); crcArr[0] = crcByte1; crcArr[1] = crcByte2; const buffer = crcArr.buffer; const datav = new DataView(buffer); const uint16 = datav.getUint16(0, false); // big endian byteArr[index++] = uint16 & 0xff; byteArr[index++] = uint16 >> 8;
Android local.properties for Windows
Path for windows: sdk.dir=C\:\\android-sdk
Display Virtuals As NoEdit Fields In Keystone Admin UI
Use the post init hook. For example: Assume the Post list model has the following, of which contentFull will be filled from the content.full virtual: … content: { brief: { type: Types.Html, wysiwyg: true, height: 150 }, extended: { type: Types.Html, wysiwyg: true, height: 400 } }, contentFull: {type: Types.Html, wysiwyg: true, height: 400, noedit:… Continue reading Display Virtuals As NoEdit Fields In Keystone Admin UI
Git pull submodule
Git Pull with Submodule For a repo with submodules, we can pull all submodules using git submodule update –init –recursive for the first time. All submodules will be pulled down locally. To update submodules, we can use git submodule update –recursive –remote or simply git pull –recurse-submodules
mergeDebugResources FAILED React Native
When you’re inside your project directory try using : cd android && gradlew clean cd .. && react-native run-android
Accept Android SDK licenses from cli
The way to accept license agreements from the command line has changed. You can use the SDK manager which is located at: $ANDROID_HOME/tools/bin e.g: ~/Library/Android/sdk/tools/bin Run the sdkmanager as follows: ./sdkmanager –licenses And accept the licenses you did not accept yet (but need to).
Docker recreate
Reset all containers and images (DANGER) docker-compose rm –all && docker-compose pull && docker-compose build –no-cache && docker-compose up -d –force-recreate Rebuild the container docker-compose down && docker-compose up -d –build