Skip to content

Instantly share code, notes, and snippets.

View javawizard's full-sized avatar

Alex Boyd javawizard

View GitHub Profile
@mkleemann
mkleemann / AVR_sleep_and_wakeup.c
Created January 31, 2012 18:52
ATmega8 power down and wakeup example
/* ATmega8 with internal 4Mhz clock (6cycle + 64ms) */
#include <avr/io.h>
#include <avr/sleep.h>
#include <avr/interrupt.h>
#include <util/delay.h>
int main(void)
{
DDRC |= (1 << PC2) | (1 << PC1); // leds for testing
@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@rmaceissoft
rmaceissoft / rails_admin.rb
Created March 19, 2012 22:01
manual confirmation from admin (rails_admin) using custom action
# located at #{Rails.root}/config/initializers/rails_admin.rb
# RailsAdmin config file. Generated on March 01, 2012 17:53
# See github.com/sferik/rails_admin for more informations
RailsAdmin.config do |config|
config.current_user_method { current_user } # auto-generated
config.main_app_name = ['Timetracker', 'Admin']
config.authorize_with do
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

describe "mocked query of web service" do
it "should perform correct action on system data based on mocked response" do
RestClient = double
file = File.open('RELATIVE_FILE_PATH_HERE', 'r') #Relative to root of Rails app
data = file.read
file.close
response = double
response.stub(:code) { 200 }
response.stub(:body) { data }
@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 / {
@prakhar1989
prakhar1989 / richhickey.md
Last active November 8, 2023 17:19 — forked from stijlist/gist:bb932fb93e22fe6260b2
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@mattheworiordan
mattheworiordan / cli.rb
Created January 9, 2015 12:21
Thor with subcommands that work correctly with help
#!/usr/bin/env ruby
require 'thor'
class SubCommandBase < Thor
def self.banner(command, namespace = nil, subcommand = false)
"#{basename} #{subcommand_prefix} #{command.usage}"
end
def self.subcommand_prefix
@nitaku
nitaku / README.md
Last active May 8, 2023 17:59
Three.js isometric SVG

An example showing an isometric rendering in SVG, thanks to three.js.

The example is inspired by this post on using three.js to generate illustrations for scientific papers.

@dhilowitz
dhilowitz / How To Compile LoopAuditioneer on Mac.md
Last active February 12, 2024 18:07
Brief instructions on how to compile LoopAuditioneer on Mac

Install (compilation) instructions for LoopAuditioneer under Mac OS X

You'll need standard development tools for C++, wxWidgets 3.0 and ALSA, be sure to check the external libraries installation files for more details on what might be needed.

Install XCode and the XCode command-line development tools.

Install Homebrew.

Install wxWidgets using Homebrew: