See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
/* Changes the readable line length in Obsidian Notes. Tested in Obsidian v1.0.0 | |
See https://gist.github.com/vii33/f2c3a85b64023cefa9df6420730c7531/f4ea845b240e94c9fcd47d456340f78208dab38f | |
*/ | |
body { | |
--file-line-width: 750px; | |
} |
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits | |
* but "incrementing" them by 1 (only in the case of a timestamp collision). | |
*/ |
var page = require('webpage').create(), | |
url = 'http://example.com/'; | |
// Put the event handlers somewhere in the code before the action of | |
// interest (opening the page in question or clicking something) | |
// http://phantomjs.org/api/webpage/handler/on-console-message.html | |
page.onConsoleMessage = function(msg, lineNum, sourceId) { | |
console.log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in "' + sourceId + '")'); | |
}; |
#!/bin/sh | |
# CONFIGURATION | |
# 1. Go to @botfather and create a bot and use it's auth token as bot_token value | |
# 2. Create test channel, believe me, you need it | |
# 3. Set some url for your test channel | |
# 4. Add your bot to both channels, set their names in variables | |
# USAGE | |
# 1. Copy your markdown-formatted message into OS clipboard (Cmd+C) |
#!/bin/bash +x | |
# Source: http://www.gabsoftware.com/tips/automatically-reconnect-to-your-vpn-on-linux/ | |
# Description: | |
# Make the script executable "chmod +x /path/to/the/script.sh | |
# Put the script in .profile or .bashrc so it can be run on user login: | |
# Example: echo "/path/to/the/script.sh start &" >> .bashrc | |
# The script can be bound to shortcut keys with these commands: | |
# /path/to/the/script.sh start # starts and monitors VPN connection |
// works only for russian language but you can change arguments in meta.includes | |
// Open https://store.playstation.com/ru-ru/download/list and run script below | |
let games = []; | |
while ( | |
!document | |
.querySelector('.paginator-control__page-number--selected') | |
.nextElementSibling.classList.contains('paginator-control__arrow-navigation') |