Skip to content

Instantly share code, notes, and snippets.

View dm4's full-sized avatar
4️⃣

dm4 dm4

4️⃣
View GitHub Profile
@CaptainVincent
CaptainVincent / README.md
Last active April 18, 2024 12:08
Improve your vscode quickinput-widget

Customize your quickinput-widget

This is a small tool designed to emulate the Sublime style Command Palette as follows.

Screenshot

It requires the use of a specific extension to load the js file from this gist.

I'm using the APC extension, and the usage is as follows.

@hsiuhsiu
hsiuhsiu / sort_by_time.py
Last active January 9, 2024 07:50
sort bean count entries by time
"""Sort Beancount Entries by meta['time']
Although beancount says that time is meaningless, there are situations
where an account that should not be negative may have a negative balance
at some point because transfers that occurred on the same day are
scheduled later and spending records are scheduled earlier.
This is not a big deal, but it is a bit odd.
2021-10-01 balance Assets:Cash 500 USD
@epixoip
epixoip / 8xTitanX.md
Last active October 10, 2019 23:10
World's First 8x Nvidia GTX Titan X cudaHashcat Benchmarks
@hSATAC
hSATAC / gist:5591270
Last active December 17, 2015 09:59
Shell function to send pull request using hub
# Usage: pr (pull request current branch into develop)
# Usage 2: pr stable (pull request current branch into stable)
# Notice: replace "team" with your github team account.
function pr() {
base=$1;
if [ "$1" == "" ]; then
base="develop"
fi
hub pull-request -b team:"$base" -h team:`git rev-parse --abbrev-ref HEAD`;
@audreyt
audreyt / moe.pl
Last active October 2, 2016 17:03
簡單的 ~/bin/moe 命令列搜尋器。
#!/usr/bin/env perl
use constant MoeDatabase => "$ENV{HOME}/w/newdict/development.sqlite3";
for my $arg (@ARGV) {
my $col = 'title';
if ($arg =~ /%$/) {
$arg = "%$arg";
$col = 'def';
}
$arg .= '%' unless $arg =~ s/\$$//;
system sqlite3 => MoeDatabase, qq[
@ryin
ryin / tmux_local_install.sh
Last active April 23, 2024 01:06
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@letoh
letoh / gist:2790559
Last active March 13, 2024 07:23
[筆記] 為什麼在 x86,MBR 會被載入到 0x7C00?(完全版)

原文 Assembler / なぜx86ではMBRが"0x7C00"にロードされるのか?(完全版)

感謝 descent 大大分享本文,隨便看隨便譯。本文不是逐句譯,同時也不是這方面的專家 (不管是語言或技術),用語不一或缺漏錯誤在所難免,歡迎自行 fork 修正指教

誰適合看本文?

對 x86 架構與組合語言有基礎認識,以及從 MBR 到載入 OS 這一段過程有興趣的人 (還有談到中斷向量或 INT xxx 時不會一臉茫然的人)

@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@jimmyken793
jimmyken793 / 自動填教學意見調查
Created June 10, 2011 10:47
自動填教學意見調查
把以下的東西存成bookmark 然後在填答表格那頁點下去 然後Magic!!
javascript:y=document.forms['frm1'].elements;for(var j=1;j<=28;j++){a=y['ans'+j];if(a){var c=a.length;if(c==undefined){a.checked=(a.value=='3')}for(var i=0;i<c;i++){a[i].checked=false;if(a[i].value=='3'){a[i].checked=true}}}}