var foo = {'bar': 1};
function overwriteFoo(obj) {
obj = {'bar': 2};
}
function overwriteFooBar(obj) {
obj.bar = 2;
}
overwriteFoo(foo)
######### | |
# File: myapp-node-watcher.path | |
# | |
# Save this to /etc/systemd/system/ | |
# Run systemctl enable myapp-node-watcher.path && systemctl daemon-reload && systemctl start myapp-node-watcher.path | |
# | |
[Path] | |
PathModified=/home/myuser/myappdir/public_html | |
[Install] |
const fs = require('fs') | |
function readFile (filename) { | |
if (fs.existsSync(filename)) { | |
return fs.readFileSync(filename, 'utf8') | |
} | |
throw new Error('Cannot find file ' + filename) | |
} | |
describe('mocking individual fs sync methods', () => { |
var foo = {'bar': 1};
function overwriteFoo(obj) {
obj = {'bar': 2};
}
function overwriteFooBar(obj) {
obj.bar = 2;
}
overwriteFoo(foo)
Name: Flash | |
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc= | |
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676 | |
Thank you! |
import { browserHistory } from 'react-router'; | |
/** | |
* @param {Object} query | |
*/ | |
export const addQuery = (query) => { | |
const location = Object.assign({}, browserHistory.getCurrentLocation()); | |
Object.assign(location.query, query); | |
browserHistory.push(location); | |
}; |
{ | |
repository(name: "sickvim", owner: "jonathansick") { | |
ref(qualifiedName: "master") { | |
target { | |
... on Commit { | |
id | |
history(first: 5) { | |
pageInfo { | |
hasNextPage | |
} |
#!/bin/bash | |
killall Xcode | |
xcrun -k | |
xcodebuild -alltargets clean | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" | |
rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
rm -rf ~/Library/Caches/com.apple.dt.Xcode/* | |
open /Applications/Xcode.app |
var startLoader = function () { | |
(function() { | |
process.stdout.write('Some text here...' + "\n"); | |
var P = ["\\", "|", "/", "-"]; | |
var x = 0; | |
return setInterval(function() { | |
process.stdout.write("\r" + P[x++]); | |
x &= 3; | |
}, 250).unref(); | |
})(); |
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache | |
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
# bash web crawler | |
# $ bash crawl.sh http://example.com | |
rm urls.txt | |
rm sub-urls.txt | |
rm sub-2-urls.txt | |
site=$1 | |
function visit(){ |