Skip to content

Instantly share code, notes, and snippets.

View Softwave's full-sized avatar

Softwave Softwave

View GitHub Profile
@biomood
biomood / MoveSprite.asm
Created May 31, 2011 20:49
A C64 example in assembly that moves a sprite up/down/left/right
;*************************************************
;* Create and move a simple sprite x,y *
;*************************************************
processor 6502
org $1000
;helpful labels
CLEAR = $E544
GETIN = $FFE4
@dradtke
dradtke / Makefile
Created April 25, 2012 22:35
Hello World example for Allegro.
CC := gcc
CFLAGS := -g -Wall
LIBS := -lallegro
SOURCES := $(shell find src/ -type f -name "*.c")
OBJECTS := $(SOURCES:.c=.o)
TARGET := game
all: $(SOURCES) $(TARGET)
$(TARGET): $(OBJECTS)
@evilmarty
evilmarty / dabblet.css
Created June 29, 2012 23:12
styling the calendar indicator for webkit
html {
background: #f06;
background: linear-gradient(90deg, #cceecc,#eeeeee);
min-height: 100%;
}
input[type=date] {
background: #ccc;
background: linear-gradient(90deg, #ddd, #ccc);
border: 3px solid #eee;
border-radius: 20px;
@eriksk
eriksk / gist:3914779
Created October 18, 2012 21:14
Compile and run sfml project on mac with g++
g++ -F /Library/Frameworks -c main.cpp | g++ main.o -o main -framework sfml-window -framework sfml-graphics -framework sfml-system | exec ./main
@rogerallen
rogerallen / leip_polyrhythm.clj
Created April 30, 2013 15:57
Fun with Leipzig/Overtone & Polyrhythms
(ns explore-overtone.leip-polyrhythm
(:require [overtone.live :as o]
[leipzig.live :as ll]
[leipzig.melody :as lm]))
(def snare (o/sample (o/freesound-path 26903)))
(def kick (o/sample (o/freesound-path 2086)))
(def close-hihat (o/sample (o/freesound-path 802)))
(def open-hihat (o/sample (o/freesound-path 26657)))
(def clap (o/sample (o/freesound-path 48310)))
@BashedCrab
BashedCrab / HydrogenDemo.py
Last active March 19, 2023 04:14
Demo of the Hydrogen GUI framework for Pythonista
#
# Hydrogen is a lightweight GUI framework for Pythonista
#
# Hydrogen - https://gist.github.com/BashedCrab/5924965
#
# HydrogenLayouts - https://gist.github.com/BashedCrab/6103019
#
# HydrogenDemo - https://gist.github.com/BashedCrab/5953776
#
@Leask
Leask / happybirthday.applescript
Created July 19, 2013 15:47
Sing Happy Birthday in AppleScript
set currentUser to long user name of (get system info)
set firstName to first word of currentUser
set lastName to last word of currentUser
set noteValues to {56, 56, 58, 56, 61, 60, 50, 56, 56, 58, 56, 63, 61, 50, 56, 56, 68, 65, 61, 60, 58, 50, 66, 66, 65, 61, 63, 61} -- F
-- set noteValues to {65, 65, 67, 65, 70, 69, 60, 65, 65, 67, 65, 72, 70, 60, 65, 65, 77, 74, 70, 69, 67, 60, 75, 75, 74, 70, 72, 70} -- D
-- set noteValues to {55, 55, 57, 55, 60, 59, 50, 55, 55, 57, 55, 62, 60, 50, 55, 55, 67, 64, 60, 59, 57, 50, 65, 65, 64, 60, 62, 60} -- E
set syllables to {"hap", "p", "birth", "day", "to", "you", "[[slnc 500]]", "hap", "p", "birth", "day", "to", "you", "[[slnc 500]]", "hap", "p", "birth", "day", "dear", firstName, lastName, "[[slnc 500]]", "hap", "p", "birth", "day", "to", "you"}
@Lytol
Lytol / IRSSI Cheat Sheet.md
Last active January 24, 2020 04:57
IRSSI Cheat Sheet

General

  • /quit – Quit IRSSI

Windows

  • option+# – Navigate to specified window
  • ctrl-n – Navigate to next window
  • ctrl-p – Navigate to previous window
@hlung
hlung / How to connect PS3 controller to a Mac or PC.md
Last active July 22, 2024 21:41
How to connect PS3 controller to a Mac or PC

How to connect PS3 controller to a Mac or PC

This is how you connect PS3 controller to Mac OSX, PC, etc. when previously connected to a PS3. You will need a Mini USB cable. Overcome your laziness, get up of your chair, and go get one!

A big misconception is that keep holding PS button will reset the controller's pairing. It DOES NOT! From my testings, the controller keeps paring with the last machine it was CONNECTED VIA A USB CABLE.

Here are the steps:

@ftrain
ftrain / .emacs
Last active July 16, 2021 17:26
a nice .emacs for when you are on a terminal. Respects scroll wheel events. Very useful when run inside of tmux and combined with this tmuxconf: https://gist.github.com/ftrain/8443744
;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; enable visual feedback on selections
(setq transient-mark-mode t)
;; default to better frame titles
(setq frame-title-format