Skip to content

Instantly share code, notes, and snippets.

View pnw's full-sized avatar

Patrick Walsh pnw

View GitHub Profile
@DenisIzmaylov
DenisIzmaylov / INSTALLATION.md
Last active April 27, 2023 15:44
OS X 10.11 El Capitan: fresh install with Node.js (io.js) Developer Environment

OS X 10.11 (El Capitan) / Node.js and io.js Developer Environment

Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.

Content

@peterchoo
peterchoo / README.md
Created October 3, 2014 10:13
Ember-CLI Addon Chaining - Running sub-addon blueprints automatically

Calling sub-addon blueprints from our blueprint

With Ember-CLI you now need to run ember generate <addon-name> to instantiate the addon into your application. This is also true with sub-addons.

Using the above method, you can essentially run ember generate <sub-addon-name>. The addon needs to be included as a hard dependency in your package.json. We can then configure our blueprint in blueprints/<addon-name>/index.js.

@kristianmandrup
kristianmandrup / Converting libraries to Ember CLI addons.md
Last active April 21, 2023 17:14
Guide to Developing Addons and Blueprints for Ember CLI

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.

@staltz
staltz / introrx.md
Last active July 4, 2024 10:11
The introduction to Reactive Programming you've been missing
@igniteflow
igniteflow / Custom getter and setter for Django model fields
Last active May 24, 2023 13:50
Custom getter and setter for Django model fields. This allows custom logic to be added to getters and setters without making any changes to existing code or database schema.
from django.db import models
class Person(models.Model):
_first_name = models.CharField(max_length=30, db_column='first_name')
last_name = models.CharField(max_length=30)
@property
def first_name(self):
"""your logic here, return value"""
return "foo"
@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else