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() { | |
var root = this; | |
var giveBackOldPromise = Promise; | |
var isNode = typeof process === 'object' || window === undefined; | |
var asap = function(handler) { | |
if(isNode) { | |
process.nextTick(handler); | |
} else { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Index of <?= $_SERVER['SERVER_NAME'] ?></title> | |
<style type="text/css"> | |
html, body { margin: 0; padding: 0; } | |
body { font-family: 'Helvetica Neue', Arial, sans-serif; padding: 20px; } | |
a { text-decoration: none; color: #4BB7DB; } | |
a:hover { text-decoration: underline; } |
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 out = function(val) { console.log(val); }; | |
var User = Type.create({ | |
properties: { | |
name: String, | |
id: { | |
type: Number, | |
enumerable: false | |
}, | |
class: { |
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/sh | |
TARGET="master" | |
BRANCH="seotweaks" | |
git push origin $TARGET && git stash | |
# Overwrite $TARGET with $BRANCH | |
git checkout $BRANCH | |
git merge -s ours $TARGET |
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 | |
if [ ! -d "./data" ]; then | |
mkdir -f data | |
fi | |
C:\mongodb\bin\mongod.exe --dbpath ./data/ |
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 | |
echo "Installing Express ..." | |
npm install -g express-generator | |
read -p "Choose the name for your app: " appName | |
if [[ -z "$appName" ]]; then | |
echo "Installation failed: no name supplied!" | |
exit 1 | |
fi |
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 rm -rf /usr/local/lib/node_modules | |
mkdir "${HOME}/.npm-packages" | |
export PATH="$HOME/.node/bin:$PATH" |
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
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
class MyFrame extends JFrame { | |
private JFrame reference = this; | |
JButton myButton = new JButton(); | |
myButton.setText("Exit Applcation ..."); | |
/* Add listener for the button to close */ | |
myButton.addActionListener(new ActionListener() { |
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 | |
yum install -y openssh-clients man git vim wget curl ntp | |
chkconfig ntpd on && chkconfig sshd on | |
chkconfig iptables off && chkconfig ip6tables off | |
sed -i -e 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config | |
sed -i 's/^\(Defaults.*requiretty\)/#\1/' /etc/sudoers | |
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers | |
mkdir /home/vagrant/.ssh && chmod 700 /home/vagrant/.ssh | |
curl https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub >> /home/vagrant/.ssh/authorized_keys | |
chmod 600 /home/vagrant/.ssh/authorized_keys |
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/env bash | |
# Download latest toolbelt from their website | |
# https://devcenter.heroku.com/toolbelt-downloads/ | |
heroku login | |
# E-Mail: .... | |
# Password: .... | |
echo -n "Enter your GitHub Repo URL: " |