Skip to content

Instantly share code, notes, and snippets.

Josh Thompson josh-works

Block or report user

Report or block josh-works

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@levelsio
levelsio / btc-eth-dca-buy.php
Last active May 3, 2019
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
View btc-eth-dca-buy.php
<?
//
// [ BUY BTC & ETH DAILY ON BITSTAMP ]
// by @levelsio
//
// 2017-08-23
//
// 1) buy $40/day BTC
// 2) buy $10/day ETH
//
@NicholasJacques
NicholasJacques / rails_setup.markdown
Last active Sep 27, 2018
Getting Started with RSpec and Rails:
View rails_setup.markdown

Getting Started with RSpec and Rails:

Setting up a new Ruby on Rails project using RSpec, Cabybara, FactoryGirl and DatabaseCleaner

What will this tutorial do you for you?

This tutorial will help guide you through the process of setting up a new Ruby on Rails project with robust testing capabilities. This tutorial makes a couple of assumptions:

  • You have installed Ruby on Rails and have a rudimentary understanding of how to use it.
  • You have installed bundler
@kristopolous
kristopolous / hn_seach.js
Last active Apr 7, 2019
hn job query search
View hn_seach.js
function query() {
var
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments),
shown = 0, total = job_list.length;
// Traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.classList.contains(klass)) {
@spiffytech
spiffytech / import.rb
Last active Feb 5, 2019 — forked from evanwalsh/import.rb
Imports a Squarespace dump into Jekyll
View import.rb
# coding: utf-8
require 'rubygems'
require 'hpricot'
require 'nokogiri'
require 'fileutils'
require 'safe_yaml'
require 'time'
require 'uri'
require 'open-uri'
View gist:9919357

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@poopsplat
poopsplat / gist:7195274
Last active May 21, 2019
Mac Terminal Cheat Sheet
View gist:7195274

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor
View .pryrc
# === EDITOR ===
Pry.editor = 'vim'
# == Pry-Nav - Using pry as a debugger ==
Pry.commands.alias_command 'c', 'continue' rescue nil
Pry.commands.alias_command 's', 'step' rescue nil
Pry.commands.alias_command 'n', 'next' rescue nil
Pry.commands.alias_command 'r!', 'reload!' rescue nil
Pry.config.color = true
You can’t perform that action at this time.