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> | |
<script> | |
"use strict"; | |
class BaseClass { | |
//Adds the parameters of a method to the context (this) | |
addParametersToThis() { | |
var parameters = this.getFunctionParameterNames(this.constructor); |
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
/* Example: Say you run this from the command line: | |
node myscript.js -color blue -names joe jenny -month september | |
You can get the arguments in your script by calling the following method as such: | |
var color = getCmdLineArgument("-color") //returns "blue" | |
var names = getCmdLineArgument("-names", 2) //returns ["joe", "jenny"] | |
var month = getCmdLineArgument("-month") //returns "september" | |
var ghost = getCmdLineArgument("-ghost") //returns null |
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
[alias] | |
dt = difftool | |
mt = mergetool | |
[diff] | |
tool = bc3 | |
[difftool] | |
prompt = false | |
[difftool "bc3"] | |
cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" | |
[difftool "p4"] |
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 apt-get update | |
sudo apt-get install -y apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt-get update | |
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual | |
sudo apt-get install -y docker-engine | |
sudo service docker start | |
sudo docker pull php:5.6-apache |
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
class Node: | |
def __init__(self, label=None, data=None): | |
self.label = label | |
self.data = data | |
self.children = dict() | |
def addChild(self, key, data=None): | |
if not isinstance(key, Node): | |
self.children[key] = Node(key, data) | |
else: |
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
#!/bin/bash | |
# file name to be split | |
input=$1 | |
# text to prepend to the file name of the slices | |
prepend=$2 | |
# counter for the slices | |
slice_counter=1 | |
# current start | |
start=0 |
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
# run the command with nohup | |
nohup npm run my-process & | |
# check that it's running | |
jobs | |
# detach your session from that job | |
disown -h %1 |
OlderNewer