This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Global install of the app generator | |
| npm install -g create-react-app | |
| ## Setup the app (first-time only) | |
| create-react-app my-app | |
| cd my-app | |
| git init | |
| # Create the Heroku app; requires free account at https://www.heroku.com/ | |
| heroku create -b https://github.com/heroku/heroku-buildpack-static.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // React Native SVG Component | |
| // https://github.com/react-native-community/react-native-svg | |
| // | |
| // Process | |
| // 1. Clean up SVG in graphics app (Illustrator/Sketch/etc) to set consistent width, height, and make sure the viewBox is "0, 0, W, H" | |
| // 2. Open SVG in text editor to remove width, height, and any undesired/unnecessary styles | |
| // 3. Open in https://jakearchibald.github.io/svgomg/ and optimize. | |
| // 4. Integrate info app by converting SVG tags to component-based SVG tags used in https://github.com/react-native-community/react-native-svg and updating with JS variables such that I can controls dimensions, colors, etc. | |
| // 5. Use in other components. | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Open console. | |
| (Import https://raw.githubusercontent.com/MikeMcl/decimal.js/master/decimal.js first if you want/need number formatting) | |
| Then copy & paste this + enter, to run this. | |
| Copy console output to a NewFile.js or NewFile.jsx file. | |
| prettier --write NewFile.js | |
| */ | |
| /* eslint no-console: ["error", { allow: ["log"] }] */ | |
| /* global document, Decimal*/ | |
| (() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var express = require('express'); | |
| var path = require('path'); | |
| var webpackConfig = require('./webpack.config'); | |
| var webpack = require('webpack'); | |
| var webpackDevMiddleware = require('webpack-dev-middleware'); | |
| var webpackHotMiddleware = require('webpack-hot-middleware'); | |
| var proxyMiddleware = require('http-proxy-middleware'); | |
| var devConfig = webpackConfig.devServer; | |
| var app = express(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- General Settings --> | |
| <advancedsettings> | |
| <loglevel hide="true">-1</loglevel> <!-- Comment: Disables logging --> | |
| <playcountminimumpercent>95</playcountminimumpercent> | |
| <skiploopfilter>0</skiploopfilter> <!-- Comment: For RPi or similar use 16 or higher (low CPU usage) --> | |
| <nodvdrom>true</nodvdrom> | |
| <!-- MySQL Library --> | |
| <videodatabase> | |
| <type>mysql</type> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Finish headless installation via `ssh pi@192.168.2.x` | |
| # See /boot/config.txt | |
| sudo apt-get update && sudo apt-get --purge dist-upgrade | |
| sudo raspi-config | |
| # Add locale en.us-utf8 (but keep en.gb-utf8) | |
| sudo dpkg-reconfigure locales | |
| # Timezone | |
| sudo dpkg-reconfigure tzdata | |
| # Update firmware |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Install Macports. | |
| //Install aircrack-ng: | |
| sudo port install aircrack-ng | |
| //Install the latest Xcode, with the Command Line Tools. | |
| //Create the following symlink: | |
| sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |
| //Figure out which channel you need to sniff: | |
| sudo airport -s | |
| sudo airport en1 sniff [CHANNEL] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| # Download lists, unpack and filter, write to stdout | |
| curl -s https://www.iblocklist.com/lists.php \ | |
| | sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| | xargs wget -O - \ | |
| | gunzip \ | |
| | egrep -v '^#' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # DON'T BE STUPID | |
| # THIS SCRIPT IS NOT MEANT TO BE RUN ALL AT ONCE | |
| # DO NOT RUN ANY OF THESE COMMANDS UNLESS YOU KNOW WHAT YOU'RE DOING | |
| # These are some commands I freqently find myself using. I'm saving them here for my own reference. | |
| # Check the current status of System Integrity Protection (SIP) | |
| csrutil status | |
| # Reset Permissions on MacOS Sierra the same way you used to with previous versions of OS X. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| collect($results)->pluck('Tables_in_DATABASENAME')->each(function($table){ | |
| system('php artisan infyom:scaffold '.$table.' --fromTable --tableName='.$table); | |
| }); |