^ squ x
|
,|, 1 _________________ _
| | |
| | |
| | |
"""".*""""""""""|""""""""""|."""""""""|""""""""".|"""">
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 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 |
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
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(); |
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
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
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' + |
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
'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 ); |
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
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 ) ); |
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
/* | |
* Below is an example of when to use `var` and `let` | |
*/ | |
'use strict'; | |
let a = 'a'; | |
var b = 'b'; | |
const c = 'c'; |
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
#!/bin/bash | |
sudo xcodebuild -license | |
echo " | |
alias ll='ls -lGaf' | |
" >> ~/.bash_profile | |
sudo npm i -g pm2 |