Skip to content

Instantly share code, notes, and snippets.

View bot.js
import Twit = require('twit');
async function bot() {
const twit = new Twit({
consumer_key: '',
consumer_secret: '',
access_token: '',
access_token_secret: '',
});
View DefaultKeyBinding.dict
{
// Select current word
"@d" = "selectWord:";
// Move line up
"~\UF700" = (selectParagraph:, setMark:, deleteToMark:, moveLeft:, moveToBeginningOfParagraph:, yank:, moveLeft:, selectToMark:, moveLeft:);
// Move line down
"~\UF701" = (selectParagraph:, setMark:, deleteToMark:, moveToEndOfParagraph:, moveRight:, setMark:, yank:, moveLeft:, selectToMark:);
}
View command.sh
git config --global alias.fu = "!f() { git commit --fixup $1; EDITOR=cat git rebase --interactive --autosquash $1~; }; f"
@soheilpro
soheilpro / example.sh
Last active Feb 15, 2021
Easy IIS log file format specification for goaccess.
View example.sh
goaccess -f u_ex150629.log --log-format "$(cat u_ex150629.log | ./goiisformat.sh)" --date-format '%Y-%m-%d' --time-format '%H:%M:%S'
@soheilpro
soheilpro / csvparser.js
Last active Aug 29, 2015
CSV Parser in JS
View csvparser.js
function ValueToken(value) {
this.value = value;
}
function CommaToken() {
}
function NewLineToken() {
}