Skip to content

Instantly share code, notes, and snippets.

View llkats's full-sized avatar
💭
still affable

Lydia Kats llkats

💭
still affable
View GitHub Profile
@llkats
llkats / dynamic-react-element.js
Created May 16, 2014 23:48
dynamic react element creation!
var tagname = 'p';
var aView = React.createClass({
render: function() {
return React.DOM[tagname]({}, 'here is some content');
}
});
@llkats
llkats / iLrwq.markdown
Created June 4, 2014 02:43
A Pen by Lydia Katsamberis.
@llkats
llkats / bot.rb
Created August 20, 2014 16:16
only reply to listed bots
BOTS = ['imakewebthings', 'jensechu__', 'spladow_ebooks', '__skalnik', '__briantford', 'daveleeeeee', 'leadfriedman', 'jpnutsbach']
bot.on_mention do |tweet, meta|
# Avoid infinite reply chains (very small chance of crosstalk)
next if BOTS.include?(tweet[:user][:screen_name]) && rand > 0.2
# ...
end
@llkats
llkats / fish_prompt.fish
Created August 27, 2014 23:44
my rad fish prompt
# name: GitStatus
# Find latest version from: https://github.com/godfat/fish_prompt-gitstatus
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _git_status_symbol
set -l git_status (git status --porcelain ^/dev/null)
if test -n "$git_status"
@llkats
llkats / .zshrc
Last active August 29, 2015 14:07 — forked from SlexAxton/.zshrc
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
@llkats
llkats / server.py
Created September 30, 2014 20:53
simplest way to start a server from a folder evar
python -m SimpleHTTPServer 8000
@llkats
llkats / howto.sh
Created October 16, 2014 20:13
how to install perl
# install perlbrew http://perlbrew.pl/
curl -L http://install.perlbrew.pl | bash
# follow the instructions to set perlbrew executable globally for your shell
# e.g., add the following line to your config.fish
. ~/perl5/perlbrew/etc/perlbrew.fish
# perlbrew should now be available to use
# use perlbrew to install latest perl
perlbrew install perl-5.16.0
♪♪♪ ┏(・o・)┛ ♪ doin' ♪ ┗ ( ・o・) ┓ ♪ the ♪ ┏ ( ) ┛ ♪ dev ♪ ┗ (・o・ ) ┓ ♪ dance ♪ ┏(・o・)┛ ♪♪♪
@llkats
llkats / set-path-in-fish.md
Created July 21, 2015 04:21
add a flipping var to $PATH in fish shell which you can just never remember ever

~/.config/fish/config.fish

set -g -x PATH $PATH /path/to/add

@llkats
llkats / dirty-css-hax.css
Created July 23, 2015 19:09
gross css hacks for targeting old versions of IE
/* ew */
body {
color: red; /* all browsers, of course */
color : green\9; /* IE8 and below */
*color : yellow; /* IE7 and below */
_color : orange; /* IE6 */
}