docker run -dt —name debian01 debian
docker exec -it debian01 bash
sudo su;cd ~
apt-get update
apt-get install autoconf git make build-essential re2c bison libxml2-dev libssl-dev
# A histogram of the words in the King James Bible | |
[('the', 63919), | |
('and', 51696), | |
('of', 34618), | |
('to', 13560), | |
('that', 12915), | |
('in', 12667), | |
('he', 10420), | |
('shall', 9837), |
package feriado | |
import ( | |
"fmt" | |
"github.com/go-chat-bot/bot" | |
"github.com/go-chat-bot/plugins/web" | |
"time" | |
) | |
const ( |
class Foo | |
@foo = { | |
'test' => {'test2' => 'test3'}, | |
'test4' => {'test5' => 'test6'}, | |
} | |
def self.foo? | |
@foo | |
end |
docker run -dt —name debian01 debian
docker exec -it debian01 bash
sudo su;cd ~
apt-get update
apt-get install autoconf git make build-essential re2c bison libxml2-dev libssl-dev
Ctrl+b "
- split pane horizontally.
Ctrl+b %
- split pane vertically.
Ctrl+b
arrow key - switch pane.
Hold Ctrl+b
, don't release it and hold one of the arrow keys - resize pane.
Ctrl+b c
- (c)reate a new window.
#!/usr/bin/env bash | |
#tmux new-session -d -s rails 'title rails-development; stty -ixon; vim' | |
cd ~/develop/projs/html5-audio-player-typescript | |
title oswp | |
tmux new-session -d -s oswp | |
# For some reason, send-keys does nothing here, not even an error is displayed. |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
#!/usr/bin/env ruby | |
require 'aws-sdk' | |
sts = Aws::STS::Client.new( | |
region: 'us-east-1', | |
access_key_id: "<insert access key id>", | |
secret_access_key: "<secret>" | |
) |
The API we are creating in this gist will follow these rules :
password
Grant Type only (no need for Authorization pages and such).v1.api.example.com
)The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :
# https://zvkemp.github.io/blog/2014/04/25/binary-search-trees-in-ruby/ | |
module BinaryTree | |
class EmptyNode | |
def to_a | |
[] | |
end | |
def include?(*) | |
false |