Skip to content

Instantly share code, notes, and snippets.

View tsyber1an's full-sized avatar
🎯
Focusing

Tsyren O. tsyber1an

🎯
Focusing
View GitHub Profile
@tsyber1an
tsyber1an / Dockerfile
Created October 21, 2015 15:06 — forked from Stanback/Dockerfile
PhantomJS 2.0 Dockerfile
#
# Example Dockerfile that builds PhantomJS 2.0
#
# Build with:
# docker build --rm --tag=phantom2.0:latest .
#
# Run with:
# docker run --name=phantom2.0 phantom2.0
#
# Copy the executable to your host machine for distribution:
@tsyber1an
tsyber1an / text.md
Created October 16, 2015 12:19
Bicycleman's creed

This is my bicycle. There are many like it, but this one is mine. My bicycle is my best friend. It is my life. I must master it as I must master my life. My bicycle, without me, is useless. Without my bicycle, I am useless. I must fire my bicycle true. I must shoot straighter than my enemy who is trying to kill me. I must shoot him before he shoots me. I will...

My bicycle and I know that what counts in war is not the rounds we fire, the noise of our burst, nor the smoke we make. We know that it is the hits that count. We will hit...

My bicycle is human, even as I, because it is my life. Thus, I will learn it as a brother. I will learn its weaknesses, its strength, its parts, its accessories, its sights and its barrel. I will keep my rifle clean and ready, even as I am clean and ready. We will become part of each other. We will...

Before God, I swear this creed. My bicycle and I are the defenders of my country. We are the masters of our enemy. We are the saviors of my life. So be it, until victory is Ameri

def beg(target_function):
@wraps(target_function)
def wrapper(*args, **kwargs):
msg, say_please = target_function(*args, **kwargs)
if say_please:
return "{} {}".format(msg, "Please! I am poor :(")
return msg
return wrapper
@tsyber1an
tsyber1an / bash_tricks.md
Created September 28, 2015 09:25 — forked from tedslittlerobot/bash tricks
Bash Tips and Tricks for Ninja...

Copy (OSX only)

Pipe anything to pbcopy to copy it to the clipboard: cat ~/.ssh/id_rsa.pub | pbcopy

The last argument

To insert the last argument of the previous command wherever the cursor currently is, press alt+. (or, on a mac, esc+.)

File expansions

@tsyber1an
tsyber1an / Capybara-Rspec-Rails-assets-pipeline.md
Last active August 29, 2015 14:28 — forked from linjunpop/Capybara-Rspec-Rails-assets-pipeline.md
Capybara, Rspec, Rails assets pipeline
@tsyber1an
tsyber1an / Capybara.md
Last active August 29, 2015 14:27 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins

@tsyber1an
tsyber1an / main.js
Created June 12, 2015 11:35
Example remote data with filter
'use strict';
var React = require('react')
var DataGrid = require('react-datagrid')
var columns = [
{ name: 'id', title: '#', width: 150 },
{ name: 'firstName'},
{ name: 'lastName' },
{ name: 'city', width: 200 },
<!doctype html>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="http://rawgit.com/carlosrocha/react-data-components/master/css/table-twbs.css">
<script src="http://fb.me/react-0.13.0-rc2.js"></script>
<script src="http://rawgit.com/carlosrocha/react-data-components/master/dist/react-data-components.min.js"></script>
<body><script id="jsbin-javascript">
var DataTable = ReactDataComponents.DataTable;
@tsyber1an
tsyber1an / helpers.md
Last active September 14, 2015 10:16
Development cheat sheet

GIT

Ruby's syntax check for changed files.

git diff --name-only | xargs -IN ruby -c N

Run tests for changed test files

git diff --name-only | grep "test/" | grep -vE "support|helper" | xargs -IN bundle exec ruby -Itest N