Skip to content

Instantly share code, notes, and snippets.

@arrowrowe
arrowrowe / arrowrowe.ahk
Last active October 15, 2016 18:00
A AutoHotKey Configuration File
Capslock::Ctrl
LCtrl::Capslock
; ----------------------- ----------------------- -----------------------
; Chrome
; ----------------------- ----------------------- -----------------------
; Switch between tabs
LAlt & ,::Send ^+{TAB}
LAlt & .::Send ^{TAB}
#!/usr/bin/env python
"""
Quick script to beemind entering at least some meals into MyFitnessPal for the day.
Setup instructions:
- install myfitnesspal, requests and keyring (if you don't have them)
- call keyring.set_password("myfitnesspal", <your_username>, <your_password>)
- call keyring.set_password("beeminder", <your_username>, <your_api_key>)
@craigeley
craigeley / read_later.rb
Last active December 15, 2015 02:14
A simple Ruby script that uses the Readability API to save articles for offline viewing and storage. Create a Readability API key at https://www.readability.com/settings/account
#!/usr/bin/ruby
require 'json'
require 'erb'
require 'open-uri'
# Uncomment these lines if you are having encoding issues on OS X Yosemite
# if RUBY_VERSION =~ /2.0.0/
# Encoding.default_external = Encoding::UTF_8
# Encoding.default_internal = Encoding::UTF_8

Build a scalable Twitter clone with Django and GetStream.io

In this tutorial we are going to build a Twitter clone using Django and GetStream.io, a hosted API for newsfeed development.

We will show you how easy is to power your newsfeeds with GetStream.io. For brevity we leave out some basic Django-specific code and recommend you refer you to the Github project for the complete runnable source code. At the end of this tutorial we will have a Django app with a profile feed, a timeline feed, support for following users, hashtags and mentions.

I assume that you are familiar with Django. If you're new to Django the [official tutorial] (https://docs.djangoproject.com/en/2.0/intro/) explains it very well.

@arpanpal010
arpanpal010 / multisearch.js
Created November 6, 2014 15:05
multisearch - search multiple website from a single searchbox using ;prefixes (used in my homepage)
<script type="text/javascript">
function fn_search() {
var leader= ';'; //this key determines its a search prefix
var searchForm=document.getElementById('searchForm');
var actionList=[ // match string prefix names, field names and default input required by search engines
//{ //template
// match_string: "",
// name: "",
// url: "",
// extra_inputs: [
@quantentunnels
quantentunnels / layouts
Last active December 3, 2016 20:48
Keyboard layouts
# Marius' Keyboard layouts
* ErgoDox Qwerty Kinesis mod with black DSA
http://www.keyboard-layout-editor.com/#/layouts/c5707cd171f028cc70fd105c404bdda3
Pulse Keycaps
http://www.keyboard-layout-editor.com/#/layouts/48c7b2ba340bde1fc0e032cc9c2f00d7
* Planck Qwerty
http://www.keyboard-layout-editor.com/#/layouts/196a676277f14a56f57e54c37e93c4e5
Pulse Keycaps
http://www.keyboard-layout-editor.com/#/layouts/6bfdf30fbc09d9d25c1bc55694dc7167
@dylan-conlin
dylan-conlin / cVimrc
Last active March 9, 2020 16:34
cVimrc
" hi there!
let mapleader = ","
map W :tabdetach<CR>
map A :tabattach<Space>
map U lastClosedTab
map O :history<Space>
map yt :duplicate<CR>
map <C-s> openSearchBar
map <C-r> openSearchBarReverse
// Generated by LiveScript 1.2.0
(function(){
var XLSX, sheet_to_socialcalc, wb;
XLSX = require('xlsx');
sheet_to_socialcalc = function(){
var header, sep, meta, end, scencode, scsave;
header = "socialcalc:version:1.5\nMIME-Version: 1.0\nContent-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave";
sep = "--SocialCalcSpreadsheetControlSave\nContent-type: text/plain; charset=UTF-8";
meta = "# SocialCalc Spreadsheet Control Save\npart:sheet";
end = "--SocialCalcSpreadsheetControlSave--";
#!/usr/bin/env lsc
XLSX = require \xlsx
sheet_to_socialcalc = do ->
const header = """
socialcalc:version:1.5
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave
"""
const sep = """
--SocialCalcSpreadsheetControlSave
@calorie
calorie / .cvimrc
Last active April 15, 2020 10:28
.cvimrc
set nocncpcompletion
set nosmoothscroll
set nohud
set noregex
set noinsertmappings
set noautoupdategist
set nochangelog
set typelinkhints
set defaultnewtabpage
let scrollduration = 10