This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.1" encoding="UTF-8"?> | |
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
<!-- | |
Data generated Wed Mar 23 01:35:41 2022 | |
Generated by kluchrtoxml_64 build 203 | |
--> | |
<!--Last edited by Ukelele version 351 on 2022-03-23 at 01:45 (GMT+8)--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This hook is run after a new virtualenv is activated. | |
#set -e # abort after any errors | |
#set -u # exit after accessing an undefined variable | |
libs=(PyQt4 sip.so sipconfig.py) | |
python_version=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))") | |
var=( $(which -a ${python_version}) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (C) Mathieu Blondel, November 2013 | |
# License: BSD 3 clause | |
import numpy as np | |
from scipy.linalg import svd | |
def frequent_directions(A, ell, verbose=False): | |
""" | |
Return the sketch of matrix A. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Many thanks to the author of and contributors to the following posts: | |
;; https://gist.github.com/mislav/5189704 | |
;; http://robots.thoughtbot.com/post/53022241323/seamlessly-navigate-vim-and-tmux-splits | |
;; | |
;; TODO: Make a script that generates tmux and emacs code without duplication | |
;; | |
;; NOTE: My keybindings are not the default emacs ones, using windmove | |
;; Try to move direction, which is supplied as arg | |
;; If cannot move that direction, send a tmux command to do appropriate move |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------- | |
# This code is for Twitter Bootstrap 2! | |
# -------------------------------------------- | |
# | |
# The MIT License (MIT) | |
# Copyright (c) 2012-2015 Dennis Riehle | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##### | |
# | |
# This script creates android emulators on the fly. | |
# | |
# Please refer to the README for usage instructions. | |
# | |
#### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on a modified Django 1.4 project settings (you will most likely need | |
# to heavily customize this for your project). | |
# Assumed to be in <repo root>/myproject/conf/base.py | |
import os | |
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) | |
PACKAGE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
sudo apt-get update | |
sudo apt-get install unzip curl python-software-properties openjdk-7-jre -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.2.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
sudo mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cloudsearch import connect_cloudsearch, get_document_service | |
endpoint = 'paste your doc service endpoint here' | |
service = get_document_service(endpoint=endpoint) # Get a new instance of cloudsearch.DocumentServiceConnection | |
# Presumably get some users from your db of choice. | |
users = [ | |
{ | |
'id': 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define("facebook", ["jquery", "https://connect.facebook.net/en_US/all.js"], function($) { | |
$("<div id='fb-root'></div>").prependTo($("body")); | |
FB.init({ | |
appId : 'YOUR_APP_ID', // App ID | |
channelUrl : '//YOUR_DOMAIN/channel.html', // Channel File | |
status : false, // check login status | |
cookie : false, // enable cookies to allow the server to access the session | |
xfbml : false // parse XFBML |
NewerOlder