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
class FooStore { | |
@observable foos = [] | |
getFoos = () => { | |
return this.foos | |
} | |
getFoo = id => { | |
return this.foos.find(foo => foo.id === id) | |
} |
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
#002b36,#073642,#268bd2,#eee8d5,#073642,#93a1a1,#859900,#cb4b16 | |
You can set 'compact' view's chat colors by doing /color NAME HEXCODE |
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 HtmlWebpackPlugin = require('html-webpack-plugin') | |
var HtmlWebpackPluginConfig = new HtmlWebpackPlugin({ | |
template: __dirname + '/app/index.html', | |
filename: 'index.html', | |
inject: 'body' | |
}) | |
module.exports = { | |
devtool: 'cheap-module-eval-source-map', | |
devServer: { |
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
ssh-keygen -t ecdsa -b 521 |
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
#!/usr/bin/env python | |
import os, hashlib | |
current_dir = os.getcwd() | |
hashes = [] | |
for root,dirs,files in os.walk(current_dir): | |
for f in files: | |
current_file = os.path.join(root,f) | |
H = hashlib.md5() | |
try: |
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
# Get everything ready on a Mac | |
brew install docker docker-machine docker-compose | |
# Create a new machine (based on the 1.8.1 boot2docker iso) | |
docker-machine create --driver vmwarefusion --vmwarefusion-memory-size 2048 --vmwarefusion-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.8.1/boot2docker.iso osxdock | |
# Bring the machine up | |
docker-machine start osxdock | |
# Configure Shell |
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
#!/usr/bin/env python | |
import SimpleHTTPServer | |
class MyHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def end_headers(self): | |
self.send_my_headers() | |
SimpleHTTPServer.SimpleHTTPRequestHandler.end_headers(self) | |
def send_my_headers(self): |
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 | |
printername="XX - Lexmark" | |
location="XX - YY Office" | |
gui_display_name="XX - Lexmark" | |
address="socket://10.51.0.2" | |
driver_ppd="/Library/Printers/PPDs/Contents/Resources/Lexmark CX410 Series.gz" | |
### Printer Install ### | |
# Install the printer. | |
/usr/sbin/lpadmin -p "SF.3F.Lexmark" -L "MT-SF Office" -E -v socket://10.51.0.2 -P "$driver_ppd" -o printer-is-shared=false |
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
apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential libevent-dev libtool autoconf automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev | |
#git | |
#procps-ng | |
./configure --prefix=/usr \ | |
--exec-prefix= \ | |
--libdir=/usr/lib \ |
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
FROM debian:wheezy | |
# phusion/baseimage:0.9.12 | |
ENV HOME /root | |
WORKDIR /root | |
RUN apt-get update && apt-get install -y build-essential libxslt1-dev libxml2-dev zlib1g-dev libpcre3-dev libbz2-dev libssl-dev wget git | |
RUN wget http://nginx.org/download/nginx-1.6.1.tar.gz && tar xf nginx-1.6.1.tar.gz && git clone https://github.com/yaoweibin/nginx_tcp_proxy_module.git | |
RUN cd nginx-1.6.1 && patch -p1 < ../nginx_tcp_proxy_module/tcp.patch | |
RUN cd nginx-1.6.1 && ./configure --add-module=../nginx_tcp_proxy_module --prefix=/nginx && make && make install | |
RUN apt-get purge -y build-essential wget git && apt-get clean autoclean && apt-get autoremove -y |