- Magnet - go throught the set up and boot at login
- WebStorm - License it, theme = dracula, javascript = ES6, keybind
Run
=⌘R
#!/bin/bash
while true; do
#!/bin/bash | |
sudo xcodebuild -license | |
echo " | |
alias ll='ls -lGaf' | |
" >> ~/.bash_profile | |
sudo npm i -g pm2 |
/* | |
* Below is an example of when to use `var` and `let` | |
*/ | |
'use strict'; | |
let a = 'a'; | |
var b = 'b'; | |
const c = 'c'; |
const fs = require( 'fs' ) | |
, path = require( 'path' ) | |
, _ = require( 'lodash' ); | |
let rootPath = "/path/to/remove"; | |
rmRF(rootPath); | |
function rmRF( dirPath ) { | |
fs.readdir( dirPath, ( err, files ) => { | |
if ( err ) console.log( JSON.stringify( err ) ); |
'use strict'; | |
function doubleInteger( i ) { | |
// i will be an integer. Double it and return it. | |
return i * 2; | |
} | |
function isNumberEven( i ) { | |
// i will be an integer. Return true if it's even, and false if it isn't. | |
return ( i % 2 === 0 ); |
const http = require('http'); | |
// Create an HTTP server | |
var srv = http.createServer( (req, res) => { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('okay'); | |
}); | |
srv.on('upgrade', (req, socket, head) => { | |
socket.write('HTTP/1.1 101 Web Socket Protocol Handshake\r\n' + | |
'Upgrade: WebSocket\r\n' + |
printf '''\nalias showfiles="\ndefaults write com.apple.finder AppleShowAllFiles YES\nkillall -KILL Finder"\n''' >> ~/.bash_profile && printf '''alias hidefiles="\ndefaults write com.apple.finder AppleShowAllFiles NO\nkillall -KILL Finder"\n''' >> ~/.bash_profile && source ~/.bash_profile
Now you can easily hidefiles
and showfiles
for hidden .gitconfig
for instance
function getNow( off ) { | |
let date = new Date(); | |
date.setTime( date.getTime() + ( 3600000 * off || 0 ) ); | |
let y = date.getFullYear(), | |
mo = date.getMonth() + 1, | |
d = date.getDate(), | |
h = date.getHours(), | |
m = date.getMinutes(), | |
s = date.getSeconds(), | |
mm = date.getMilliseconds(); |
var arr = [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u |