Skip to content

Instantly share code, notes, and snippets.

@zyguan
zyguan / pom.xml
Last active November 30, 2015 02:06 — forked from codahale/pom.xml
Take this and save it as pom.xml in your project directory.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>sample-project</artifactId>
<version>0.0.1-SNAPSHOT</version>
Windows Registry Editor Version 5.00
; Here are some of common key codes
; 3a (CapsLock)
; e0 5d (Menu)
; e0 5b (LeftWindow)
; e0 5c (RightWindow)
; e0 1d (RCtrl) 1d (LCtrl)
; e0 38 (RAlt) 38 (LAlt)
; see http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html for details
@zyguan
zyguan / st_example.go
Created October 22, 2015 08:50
A clumsy segment tree implementation in golang
package main
import (
"errors"
"fmt"
"math"
)
func divide(l, r int) (int, error) {
m := (l + r) / 2
@zyguan
zyguan / ntpdate.yml
Created September 6, 2015 02:15
A simple ansible playbook for controlling ntpdate job
---
- hosts: nodes
vars:
server: ntp.ubuntu.com
m: "0"
h: "*/6"
dow: "*"
dom: "*"
mon: "*"
state: present
@zyguan
zyguan / grub.cfg
Last active November 19, 2015 09:40
Examples of booting linux iso images
# This configuration may be outdated, please see:
# https://wiki.archlinux.org/index.php/Multiboot_USB_drive
# https://wiki.archlinux.org/index.php/Talk:Multiboot_USB_drive
set timeout=10
insmod search_fs_uuid
# you must replace E85C-CED5 with the actual uuid
search --no-floppy --set=isopart --fs-uuid E85C-CED5