Skip to content

Instantly share code, notes, and snippets.

@alanpeabody
alanpeabody / .projections.json
Last active August 29, 2015 13:56
Ember App Kit & vim-projectile
{
"app/models/*.js": {
"command": "model",
"template": [ "export default DS.Model.extend({", "});" ]
},
"app/router.js": { "command": "router"},
"app/routes/*.js": {
"command": "route",
"template": [ "export default Ember.Route.extend({", "});" ],
"alternate": "app/controllers/%s.js"
@napcs
napcs / video.md
Created September 8, 2012 16:25
Video project

Intro to Programming video

I want to make a video to show my class of would-be IT people. If you write code, would you send me a video clip (webcam, less than 30s) with the following?

  • Introduce yourself (name, where you work)
  • Why you love what you do
  • Why you love open-source software (optional, but would be super helpful)

Email the clip (or a link I can download the clip) to bphogan at gmail and be sure to include your Twitter username so I can add that on your clip.

@crosbymichael
crosbymichael / server.go
Created May 26, 2013 02:38
Quick and simple static file server in Go. No more python -m SimpleHttpServer
package main
import (
"flag"
"fmt"
"log"
"net/http"
"os"
)
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
aws: grunt.file.readJSON(process.env.HOME + '/grunt-aws.json'),
copy: loadConfig('copy'),
concat: loadConfig('concat'),
s3: loadConfig('s3'),
dockerfiles: {
options: {
packageInstall: 'pacman -S --noconfirm "<%= package.name %><%= package.version %>"',
// or function(name, version) { return "pacman -S --noconfirm " + name + version; }
@events =
events: {}
on: (topic, handler, context = this) ->
(@events[topic] or= []).push {handler, context}
trigger: (topic, args...) ->
return unless @events[topic]?
handler.apply(context, args) for {handler, context} in @events[topic]
@strobe
strobe / .emacs
Last active August 6, 2016 17:00
osx emacs config for scala
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; !! General Settings !!
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@bigfive
bigfive / active_admin_helper.rb
Last active November 15, 2018 21:33
Active admin reskin
module ActiveAdminHelper
def admin_arbre_context
@admin_arbre_context ||= Arbre::Context.new(assigns, self)
end
def default_renderer
case controller.send(:resource_class).name
when "ActiveAdmin::Page"
"page"
@theotherzach
theotherzach / 20130310141955_add_hstore_extension.rb
Last active May 29, 2020 17:30
Rails 4 and Postgres: Getting HStore and Array
class AddHstoreExtension < ActiveRecord::Migration
def up
execute 'CREATE EXTENSION hstore'
end
def down
execute 'DROP EXTENSION hstore'
end
end
@Mostly-BSD
Mostly-BSD / VoidLinux-On-System76_GalagoPro2.md
Last active October 22, 2021 12:39
Some Notes on Void Linux on System76 Galagopro 2.

These are some notes for running void linux on System76 Galagopro 2. Don't blindly cut-copy-paste, use your common sense.

Kernel

Some useful Kernel boot options.

In /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="splash loglevel=4 slub_debug=P page_poison=1 ec_sys.write_support=1 atkbd.reset intel_pstate=skylake_hwp psmouse.synaptics_intertouch=1 video=eDP-1:2048x1152-32@60 i915.enable_dc=2 i915.enable_guc=3 i915.modeset=1 i915.disable_power_well=0 i915.fastboot=1"
@dux
dux / pull-request-prepare.rb
Last active March 2, 2022 19:06
prepares github pull request with full clean view of the selected files
#!/usr/bin/env ruby
# prepares github pull request with full clean view of the selected files
# to run it
# * delete some files after commit that is pushed, and leave them unstaged
# * pull-request-prepare.rb will
# * create branch-review-start with all marked files deleted
# * create branch-review-end with all marked files re-added
# * leave starting branch untouched
# * open github url for pull request