Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Sales twoism-dev

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am twoism-dev on github.
  • I am bensales (https://keybase.io/bensales) on keybase.
  • I have a public key whose fingerprint is CC6F 3C33 DC86 EF85 F5D2 03F6 BE41 0A6A D3B0 20B8

To claim this, I am signing this object:

@twoism-dev
twoism-dev / README-Template.md
Created Sep 27, 2018 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

View keybase.md

Keybase proof

I hereby claim:

  • I am twoism-dev on github.
  • I am bensales (https://keybase.io/bensales) on keybase.
  • I have a public key whose fingerprint is AC9A C381 53BB 8AED 95A6 522E 92DB 1BCA 068F EF80

To claim this, I am signing this object:

View html5.haml
!!! 5
%html{:lang => "en"}
%head
%meta{:charset => "utf-8"}
%title Title
%meta{'http-equiv' => "utf-8", 'content' => "IE=Edge"}
%meta{'viewport' => "width=device-width, initial-scale=1"}
%meta{'author' => ""}
%meta{'description' => ""}
%link{'rel' => 'stylesheet', 'href' => ''}
View html5.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title> </title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
@twoism-dev
twoism-dev / git.md
Last active Mar 13, 2019
Hybrid Git Flow
View git.md

Our Git Flow

We are using a simple git flow based on git flow and github flow. We have two branches develop and master.

develop is a representation of staging

master is a representation of production

The Rules

@twoism-dev
twoism-dev / casino.md
Last active Dec 15, 2015
How spam helped me win big at the casino
View casino.md

I was clearing out spam from my inbox, and one email caught my eye:

yo mate, ok I`ll give you my trick...
you know in roulette you can bet on blacks or reds. If you bet $1 on black and it goes black you win $1 but
if it goes red you lose your $1.
So I found a way you can win everytime:

bet $1 on black if it goes black you win $1

now again bet $1 on black, if it goes red bet $3 on black, if it goes red again bet $8 on black,
if red again bet $20 on black, red again bet $52 on black (always multiple you previous lost bet around 2.5)
if now is black you win $52 so you have $104 and you bet:

$1 + $3 + $8 + $20 + $52 = $84 So you just won $20 :)

now when you won you start with $1 on blacks again etc etc.  its always bound to go black
eventually (it`s 50/50) so that way you eventually always win. But there`s a catch. If you
start winning too much (like $1000 a day) casino will finally notice something and ca
@twoism-dev
twoism-dev / gist:4730151
Created Feb 7, 2013
A demo of how block returns.
View gist:4730151
class Tester
@@blocks = []
def self.add(&block)
@@blocks << block
end
def self.run
@@blocks.each_with_index do |block, n|
exec(n)
View gist:4234592
Use mysqldump to backup your databases to text files!
Stop the database server
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
View simple-deploy.md

Server manifesto

Provisioning + Deploying is too complicated, lets do the minimum amount of work to build a safe, performant server.

System update

Update apt-get's local database with server's pkglist's files.

apt-get update

Git install

You can’t perform that action at this time.