Skip to content

Instantly share code, notes, and snippets.

View ariunbayar's full-sized avatar
👀

Ariunbayar Baterdene ariunbayar

👀
View GitHub Profile
@ariunbayar
ariunbayar / aoe voobly profile match list image.js
Last active April 10, 2017 12:22
Shows map image in match list of a users profile
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.voobly.com/profile/view/*/Matches*
// @grant none
// ==/UserScript==
#!/bin/sh
for f in "$@"; do
mod_date=`stat -c %y "$f" | cut -d ' ' -f1`
file=`basename "$f"`
dir=`dirname "$f"`
mv -- "$f" "$dir/$mod_date $file"
done
@ariunbayar
ariunbayar / log_your_mail.php
Created September 23, 2014 06:39
Logs your sent email for PHP.
#!/usr/bin/php
<?php
/*
* Don't forget to set following in your php.ini:
* sendmail_path = /path/to/mail_log.php
*
* You can test with following php code:
* mail('user@email.dev', 'subject', 'body');
*/
$mail = '';
@ariunbayar
ariunbayar / gist:5162c649884e4cecb2d8
Last active August 29, 2015 14:02
spf13 cheatsheet

Python

Shortcut Description
[t Beginning of block
]e End of block
]< Shift block left
]> Shift block right
]# Comment selection
]u Uncomment selection
http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1)
===
In the output of the above commands, the first column indicates the mode in which the map works. You can interpret the first column character using the following table:
n Normal mode map. Defined using ':nmap' or ':nnoremap'.
i Insert mode map. Defined using ':imap' or ':inoremap'.
v Visual and select mode map. Defined using ':vmap' or ':vnoremap'.
x Visual mode map. Defined using ':xmap' or ':xnoremap'.
s Select mode map. Defined using ':smap' or ':snoremap'.
c Command-line mode map. Defined using ':cmap' or ':cnoremap'.