Skip to content

Instantly share code, notes, and snippets.

/*
-----------------------------------
Emoji - natural display for the web
-----------------------------------
These font face definitions allows to display emoji glyphs intermingled with
arbitrary characters outside emoji unicode blocks.
Usage
@wranai
wranai / day-mode
Created December 20, 2018 00:43 — forked from Skehmatics/day-mode
#!/bin/bash
# export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me
PID=$(pgrep -u USER gnome-session-b)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://WALLPAPER-PATH'
/usr/bin/gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected] set org.zzrough.gs-extensions.drop-down-terminal background-color 'rgb(69,90,100)'
@wranai
wranai / annoying-glove.py
Last active November 29, 2017 14:40
Load binary GloVe vectors and index them with Annoy
#!/usr/bin/env python
# Just a twist on the example from annoy's readme
#
# Here's glove.c's crap that helped figure out the binary format:
#
# for (b = 0; b < (vector_size + 1); b++) fprintf(fout," %lf", W[ a * (vector_size + 1) + b]); # params with bias
# for (b = 0; b < (vector_size + 1); b++) fprintf(fout," %lf", W[(vocab_size + a) * (vector_size + 1) + b]); # context with bias
#