This file contains 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
<html> | |
<head> | |
<title>Web Browser</title> | |
<style> | |
body { | |
margin: 24px; | |
} | |
.browser { | |
font-family: system, -apple-system, ".SFNSDisplay-Regular", "Helvetica Neue", "Lucida Grande", sans-serif; | |
font-size: 14px; |
This file contains 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
rm /usr/local/bin/subl; | |
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl; |
This file contains 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"; | |
var fs = require("fs"); | |
let getLines = function getLines (filename, lineCount, callback) { | |
let stream = fs.createReadStream(filename, { | |
flags: "r", | |
encoding: "utf-8", | |
fd: null, | |
mode: 438, // 0666 in Octal |
This file contains 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
# . mkv.sh "xyz/BDMV/STREAM" "~/fs"; | |
cd "$1"; | |
for i in *.m2ts; do | |
mkvmerge -o "$2/$i.mkv" $i; | |
done | |
cd -; |
This file contains 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
docker pull eu.gcr.io/euphoric-adventures/uk-train-boards_ukrsib:latest; | |
docker stop ukrsib; | |
docker rm ukrsib; | |
docker run --name ukrsib --net routing -v ~/uktb/app:/var/www/htdocs/ -d eu.gcr.io/euphoric-adventures/uk-train-boards_ukrsib; | |
docker stop uk-train-boards_nginx; | |
docker rm uk-train-boards_nginx; | |
docker run --name uk-train-boards_nginx -p 10080:10080 --net routing -v ~/uktb/app:/var/www/htdocs/ -v ~/uktb/docker/nginx.conf:/etc/nginx/conf.d/default.conf -d nginx; | |
# docker tag uk-train-boards_ukrsib eu.gcr.io/euphoric-adventures/uk-train-boards_ukrsib:latest; |
This file contains 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
THIS_VERSION="9.3.0"; | |
THIS_PLATFORM="linux"; | |
echo "Downloading node.js tar..."; | |
wget https://nodejs.org/dist/v$THIS_VERSION/node-v$THIS_VERSION-$THIS_PLATFORM-x64.tar.xz -O node; | |
echo "Untarring node.js tar 'node'..."; | |
tar xf node; | |
echo "Deleting node.js tar 'node'..."; |
This file contains 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
git branch | grep \* | cut -d ' ' -f2 |
This file contains 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
sudo kill -9 $(ps auxwww | grep MacOS/loginwindow | grep james | head -1 | tr -s " " | cut -d " " -f 2) |
This file contains 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
echo ".dump" | sqlite3 ~/Library/Messages/chat.db > $(date +"%y-%m-%d").sql |
This file contains 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 Hapi = require('hapi'); | |
const allowedOrigins = []; | |
const middleware = function addCorsHeaders (request, reply) { | |
// not cors | |
if (!request.headers.origin) { | |
return reply.continue() | |
} |
NewerOlder