Skip to content

Instantly share code, notes, and snippets.

#include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
#define rep(i,n) for(long long i = 0; i < (long long)(n); i++)
#define repi(i,a,b) for(long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
#define rep(i,n) for(long long i = 0; i < (long long)(n); i++)
#define repi(i,a,b) for(long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
@shelaf
shelaf / gist:8d27012aa6a9623063f52336d9b4319c
Created January 6, 2018 02:17
TortoiseSVN/Git用差分・マージ設定
差分
WinMergeU.exe /e /ub /wl /wr /dl %bname /dr %yname "%base" "%mine%"
マージ
WinMergeU.exe /e /ub /wl /wr /dl %yname "%mine" /dm %mname "%merged" /dr %tname "%theirs"
@shelaf
shelaf / SMBDIS.ASM
Created March 27, 2018 10:35 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger ([email protected])
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
--- ricty_generator_for_nerd_fonts.sh 2018-11-06 20:40:55.693412146 +0900
+++ ricty_generator_for_nerd_fonts.sh 2018-11-08 10:18:29.953438400 +0900
@@ -251,10 +251,10 @@
exit 1
fi
# Check filename
- [ "$(basename $input_inconsolata_regular)" != "Inconsolata-Regular.ttf" ] &&
+ [ "$(basename "${input_inconsolata_regular}")" != "Inconsolata-Regular.ttf" ] &&
echo "Warning: ${input_inconsolata_regular} does not seem to be Inconsolata Regular" >&2
- [ "$(basename $input_inconsolata_bold)" != "Inconsolata-Bold.ttf" ] &&
#!/usr/bin/env bash
for f in Ricty*.ttf; do
ttx -t OS/2 "${f}"
sed -i -e 's/xAvgCharWidth value="913"/xAvgCharWidth value="500"/' "${f%%.ttf}.ttx"
mv "${f}" "${f%%.ttf}.orig.ttf"
ttx -m "${f%%.ttf}.orig.ttf" "${f%%.ttf}.ttx"
rm "${f%%.ttf}.orig.ttf" *.ttx
done