Skip to content

Instantly share code, notes, and snippets.

bigeagle bigeagle

View GitHub Profile
View gitmanul.md

Git 简要教程

##引言

鉴于使用Git有一点点门槛(比SVN稍微高一点),我写了个实用教程,如果想更进一步了解Git,或者觉得我写的太懶,推荐参考书 Progit,这本书是开源的,前四章就足够用了。

组内我和晓天、汤韬都会使用git,有问题可以线下直接问。

至于为什么要用Git,其实用SVN也是挺好的,但是SVN是集中式提交,同一时刻只能有一个人修改一个文件,这个在很多时候会比较蛋疼,另一方面SVN提交时要求联网,这样碰上断网什么的话SVN就废了。

View vpnc-script.sh
#!/bin/sh
#
# Originally part of vpnc source code:
# © 2005-2012 Maurice Massar, Jörg Mayer, Antonio Borneo et al.
# © 2009-2012 David Woodhouse <dwmw2@infradead.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
@bigeagle
bigeagle / weechat_bot2human.py
Last active Jul 14, 2018
Replace IRC message nicknames with regex match from chat text
View weechat_bot2human.py
# -*- coding:utf-8 -*-
# Bot2Human
#
# Replaces messages from bots to humans
# typically used in channels that are connected with other IMs using bots
#
# For example, if a bot send messages from XMPP is like `[nick] content`,
# weechat would show `bot | [nick] content` which looks bad; this script
# make weecaht display `nick | content` so that the messages looks like
# normal IRC message
View keymap_bigeagle.c
#include "keymap_common.h"
#include "led.h"
#include "action_layer.h"
/*
* HHKB Layout
*/
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: Default layer
* ,-----------------------------------------------------------.
View sagiri_background.css
@-moz-document domain("google.com") {
@media screen and (min-width: 1400px) {
#cnt, #viewport {
background: url(https://dn-bigeagle.qbox.me/images/moe/sagiri_small.png) fixed no-repeat 90% 100% transparent;
}
}
@media screen and (max-width: 1399px) {
#cnt, #viewport {
background: url(https://dn-bigeagle.qbox.me/images/moe/sagiri_small.png) fixed no-repeat 100% 100% transparent;
View debmirror-ubuntu.sh
#!/bin/bash
CWD="/home/bigeagle/scripts/mirror"
SYNC_HOME="/home/mirror"
SYNC_FILES="$SYNC_HOME/ubuntu"
SYNC_LOCK="$SYNC_HOME/ubuntu.lck"
#SYNC_SERVER="rsync://mirrors.6.tuna.tsinghua.edu.cn/ubuntu/"
#SYNC_SERVER="rsync://mirrors6.ustc.edu.cn/ubuntu/"
LOG_FILE="/tmp/ubuntu.log"
@bigeagle
bigeagle / dnspod.py
Created Feb 23, 2012
Update dnspod record dynamically
View dnspod.py
#!/usr/bin/env python2
# -*- coding:utf8 -*-
'''
* forked from dnspod's offical python script for dynamic dns record
* modified by Justin Wong <bigeagle(at)xdlinux(dot)info>
* LICENSE: MIT License
'''
import httplib, urllib
@bigeagle
bigeagle / config
Created Apr 12, 2016
termite.config
View config
[options]
scroll_on_output = false
scroll_on_keystroke = true
audible_bell = false
mouse_autohide = false
allow_bold = true
dynamic_title = true
urgent_on_bell = true
clickable_url = true
font = monospace 13
@bigeagle
bigeagle / scdaemon_reload.py
Created Feb 8, 2016
Along with udevedu, reload gpg scdaemon on yubikey insert
View scdaemon_reload.py
#!/usr/bin/env python2
# -*- coding:utf-8 -*-
from __future__ import print_function, division, unicode_literals
from udevedu.utils import invoke
def init():
print("Monitor Yubikey NEO")
View icecast.sh
gst-launch-1.0 \
v4l2src device=/dev/video1 ! video/x-raw,width=864,height=480 ! videoconvert ! \
clockoverlay shaded-background=true time-format="%H:%M:%S" ! vp8enc ! tee name=videoTee \
pulsesrc ! vorbisenc ! tee name=audioTee \
webmmux name=streamMux ! shout2send ip=IP port=PORT password=PASSWORD mount=/tuna.webm \
webmmux name=fileMux ! filesink location=tuna.webm \
audioTee. ! queue ! streamMux.audio_0 \
videoTee. ! queue ! streamMux.video_0 \
audioTee. ! queue ! fileMux.audio_0 \
videoTee. ! queue ! fileMux.video_0
You can’t perform that action at this time.