# Updates
apt-get update && apt-get install -y vim-nox git-core ufw curl atop htop build-essential libssl-dev linux-image-amd64 linux-headers-amd64
# Updates Profile init scripts
cd ~/
curl -sSL https://gist.githubusercontent.com/justsml/b667f158731fd054cd38/raw/5778dbb5d3d138ccf99ae1bf973457ce89661362/.bash_aliases > .bash_aliases_new
cat .bash_aliases_new >> .bash_aliases
const puppeteer = require('puppeteer'); | |
const proxyChain = require('proxy-chain'); | |
(async() => { | |
const oldProxyUrl = 'http://bob:[email protected]:8000'; | |
const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl); | |
// Prints something like "http://127.0.0.1:45678" | |
console.log(newProxyUrl); |
-- Create the table | |
CREATE TABLE IF NOT EXISTS `StateBoundaries` ( | |
`State` varchar(10) DEFAULT NULL, | |
`Name` varchar(255) DEFAULT NULL, | |
`MinLat` varchar(50) DEFAULT NULL, | |
`MaxLat` varchar(50) DEFAULT NULL, | |
`MinLon` varchar(50) DEFAULT NULL, | |
`MaxLon` varchar(50) DEFAULT NULL | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
javascript:!function(){function t(t,r){return t/r}function r(r,n){return t(r,n)*r}function n(){var n=window.prompt("Voltage?",4.2),o=window.prompt("Ohms?",.2);if(isNaN(n)&&(n=parseInt(n)),isNaN(o)&&(o=parseInt(o)),n&&o){var i="Stats:\r";i+="Amps: "+t(n,o).toFixed(2)+"\r",i+="Ohms: "+o+"\r",i+="Volts: "+n+"\r",i+="Watts: "+r(n,o).toFixed(2)+"\r",window.alert(i)}}n()}(); |
#!/bin/sh -e | |
# | |
# NOTE: Since Docker 1.10 (February 4, 2016), it has been possible to configure the | |
# Docker daemon using a JSON config file. On Linux, this file is normally located at | |
# /etc/docker/daemon.json. You should use this JSON config method if you are running | |
# a version of Docker that is at least 1.10! | |
# Here is an example configuration that sets the docker0 bridge IP to 192.168.254.1/24: | |
# { | |
# "bip": "192.168.254.1/24" | |
# } |
<html> | |
<head> | |
<title>JsTestBed</title> | |
</head> | |
<body> | |
<h2>"Async" test</h2> | |
<p> | |
In JavaScript, asynchronous calls are a lie!<br /> | |
What actually happens is the setTimeout(func, 0); gets put on the end of the call list.<br /> | |
Any direct javascript functions will get prioritised and run before the function in the timeout. |
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important
or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
//Code to create a list of touches called pointerList | |
var pointerList = []; //Array of all the pointers on the screen | |
window.addEventListener("pointerdown", updatePointer, true); | |
window.addEventListener("pointermove", updatePointer, true); | |
window.addEventListener("pointerup", remPointer, true); | |
window.addEventListener("pointercancel", remPointer, true); | |
function updatePointer(e) { | |
if(e.pointerType === "touch") { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.