Skip to content

Instantly share code, notes, and snippets.

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@ruckus
ruckus / Gemfile
Last active January 25, 2020 14:27
Example controller for a SOAP Endpoint for Quickbooks Web Connector (QWC)
# QBD Integration
gem "wash_out", "0.9.0"
gem 'qbxml', '~> 0.1.5'
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@munificent
munificent / gist:9749671
Last active June 23, 2022 04:04
You appear to be creating a new IDE...
You appear to be advocating a new:
[ ] cloud-hosted [ ] locally installable [ ] web-based [ ] browser-based [ ] language-agnostic
[ ] language-specific IDE. Your IDE will not succeed. Here is why it will not succeed.
You appear to believe that:
[ ] Syntax highlighting is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[ ] Nobody really needs:
@dartov
dartov / local_storm.sh
Created July 31, 2012 08:39
Tmux script to start local dev storm cluster
#!/bin/sh
export DISABLE_AUTO_TITLE=true
SESSION_NAME="local-storm"
tmux has-session -t $SESSION_NAME
if [ $? != 0 ]
then
@gmuller
gmuller / SieveOfEratosthenes.java
Created June 15, 2012 00:45 — forked from gresrun/redisBitSetTests.java
Going back and forth between BitSet and redis bit sets in Java
import java.util.BitSet;
import redis.clients.jedis.Jedis;
public class SieveOfEratosthenes {
private static String sieveSetKeyCorrected = "correct_sieve";
private static String sieveSetKeyDefaultJava = "wrong_sieve";
private static String spoolSieve = "sieve_set_bits";
@umjasnik
umjasnik / Sql.rl
Created December 27, 2011 20:06
simple SQL parser using ragel - get all tables that are referenced in a SQL statement
package de.uwefleischer.statemachines;
import java.util.Set;
import java.util.TreeSet;
public class Sql {
private static Set<String> tables;
%%{
@chrishomer
chrishomer / ec2-ebs-instance-resize.sh
Created October 17, 2011 18:05
Resizing an instance backed by an EBS drive on ec2
# IMPORTANT: On your machine, with the ec2 instance running
# Basic Config variables
instanceid=<instance-id>
size=50
#Get the root EBS volume id and availability zone for this instance:
oldvolumeid=$(ec2-describe-instances $instanceid |
egrep "^BLOCKDEVICE./dev/sda1" | cut -f3)
zone=$(ec2-describe-instances $instanceid | egrep ^INSTANCE | cut -f12)
echo "instance $instanceid in $zone with original volume $oldvolumeid"
@kylelemons
kylelemons / gotour-69.go
Created October 7, 2011 01:55
My solution to Go Tour #69 - Web Crawler
package main
import (
"os"
"fmt"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
namespace.views.MyWizard = Backbone.Views.extend({
initialize: function() {
_.bindAll(this, 'render', 'wizardMethod');
}
render: function() {
this.wizardMethod();
return this;
},