Skip to content

Instantly share code, notes, and snippets.

View onebree's full-sized avatar

Hunter onebree

View GitHub Profile
@arfon
arfon / big_query_examples.md
Last active September 19, 2022 13:00
BigQuery Examples for blog post

How many times shouldn't it happen...

-- https://news.ycombinator.com/item?id=11396045

SELECT count(*)
FROM (SELECT id, repo_name, path
        FROM [bigquery-public-data:github_repos.sample_files]
 ) AS F
@HoneyryderChuck
HoneyryderChuck / chat.rb
Last active January 16, 2023 07:28
Simple Chat Application, proof of concept for hybrid of thread-server http with evented-server SSE.
# chat.rb
require 'sinatra/base'
# this also loads celluloid io, let's keep that in mind
require 'celluloid/current'
require 'reel'
# The chat server, an IO Event Loop held by the actor
# Collects connections (Reel Event Streams)
#
# Contrary to EventMachine, there is no event callback for
anonymous
anonymous / IRC client in pure bash 4
Created March 28, 2016 16:57
IRC client written in pure bash using only bash builtin commands and no other binaries.
#!/bin/bash
#no PATH, no way to accidently run any programs
PATH=''
#useful variables
term_height=0
term_width=0
term_scroll_height=0
status_line_row=0
@adeekshith
adeekshith / .git-commit-template.txt
Last active February 21, 2024 12:06 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@Kovah
Kovah / hn-theme-celadon.md
Last active February 25, 2016 14:23
Hacker News Theme Celadon

Hacker News Theme Celadon

Preview

More information

=======================

*, *:before, *:after {
@Kovah
Kovah / hn-theme-amber.md
Last active September 22, 2016 15:45
Hacker News Theme Amber
@paulkernfeld
paulkernfeld / burn-name.md
Last active March 31, 2018 10:04
BurnName is a proposal for a simple and practical decentralized name registration system. Feedback wanted!

BurnName: simple decentralized username registration

BTW, this is implemented as burn-name and burn-name-writer.

BurnName is a proposal for a simple and practical decentralized name registration system. In BurnName, users burn bitcoins to bid for names. The user who bids the most for a name owns that name, after a delay. BurnName uses the existing Bitcoin blockchain and network, and it can be used by various applications.

Example applications

  • GitTorrent or a similar "decentralized GitHub"
  • Domain name registration: your username doubles as a domain name
  • Human-memorable Bitcoin addresses: map from your username to your Bitcoin address
@kaushikgopal
kaushikgopal / pre-commit
Last active April 19, 2023 09:22
pre-commit git hook - no "hacking"
#!/usr/bin/env ruby
# This pre-commit hook will prevent any commit to forbidden branches
# (by default, "staging" and "production").
# Put this file in your local repo, in the .git/hooks folder
# and make sure it is executable.
# The name of the file *must* be "pre-commit" for Git to pick it up.
def current_branch()
branches = `git branch --no-color`.split(/\n/)
@vasanthk
vasanthk / System Design.md
Last active May 3, 2024 07:46
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@oelmekki
oelmekki / doc.md
Created December 30, 2015 19:37
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.