Skip to content

Instantly share code, notes, and snippets.

@SunRain
SunRain / archlinux_android
Created January 14, 2012 02:03 — forked from adumont/archlinux_android
ArchLinux for building Android
pacman -Sy
pacman -S --needed python2 perl git gnupg flex bison gperf zip unzip sdl wxgtk squashfs-tools ncurses libpng
zlib libusb libusb-compat readline inetutils
pacman -S --needed schedtool
pacman -S --needed openjdk6
## for x86_64?
pacman -S --needed gcc-multilib gcc-libs-multilib binutils-multilib libtool-multilib lib32-libusb lib32-libusb-compat lib32-readline lib32-glibc lib32-zlib
Install yaourt (& package-query):
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@kevinold
kevinold / .ackrc
Created February 10, 2013 13:54 — forked from hernamesbarbara/.ackrc
#ack is a tool like grep, designed for programmers with large trees of heterogeneous source code
#to install ack, see http://betterthangrep.com/
#to use ack, launch terminal (mac osx) and type 'ack <some_keywords>'
#ack will search all files in the current directory & sub-directories
#here's how I have my config file setup. this file is located on mac osx here
# ~/.ackrc
# Always sort the files
@d3m3vilurr
d3m3vilurr / feedly_api.md
Last active March 30, 2024 08:21
Unofficial Feedly API Document

IDs

  • user_id - user/:uid
  • feed_id - feed/:feed_uri
  • category_id - :user_id/category/:category (special category: global.all, global.uncategorized)
  • tag_id - :user_id/tag/:tag (special tag: global.saved)

APIs

http://cloud.feedly.com/:version/:api

@jeroenvandijk
jeroenvandijk / datomic_in_memory_excision_test.clj
Last active November 11, 2021 02:36
Tests the memory usage of in-memory Datomic db when excising data
(require '[datomic.api :as d])
(def db-uri "datomic:mem://hello")
(d/create-database db-uri)
(def conn (atom {}))
(reset! conn (d/connect db-uri))
(def schema [{:db/id (d/tempid :db.part/db)
:db/ident :dummy/content
@yanmhlv
yanmhlv / example.go
Created February 8, 2016 14:49
JSONB in gorm
package main
import (
"database/sql/driver"
"encoding/json"
"github.com/jinzhu/gorm"
_ "github.com/lib/pq"
)
@mjdietzx
mjdietzx / waya-dl-setup.sh
Last active March 13, 2024 15:08
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
@metafeather
metafeather / main.go
Created April 27, 2017 13:06
Get goroutine id for debugging
# ref: https://play.golang.org/p/OeEmT_CXyO
package main
import (
"fmt"
"runtime"
"strconv"
"strings"
"sync"
)
@wabouhamad
wabouhamad / gist:e0c2cb8937ecbf15870b34f3d669a8f3
Created September 8, 2017 15:33
OCP 3.6 Ansible playbook to tune journald
name: journald optimizations to allow for increased logging rates
hosts: all
gather_facts: False
tasks:
- name: Stop and disable rsyslog
systemd:
name: "{{ item }}"
state: stopped
enabled: no
with_items: