Skip to content

Instantly share code, notes, and snippets.

task conjunctions
( ) and or xor
task command
_aliases -- Generates a list of all aliases, for autocompletion purposes
_columns -- Displays only a list of supported columns
_commands -- Generates a list of all commands, for autocompletion purposes
_config -- Lists all supported configuration variables, for completion purposes
_get -- DOM Accessor
_ids -- Shows the IDs of matching tasks, in the form of a list
_projects -- Shows only a list of all project names used
# zsh taskwarrior cheatsheet: https://gist.github.com/shuvalov-anton/cc840ee390b082070b9e
# taskwarrior cheatsheet
task add [project:<project>] [depends:id] [+tag] [+next] description
task log [project:<project>] [depends:id] [+tag] [+next] description # add finished task
task <id> edit # open the task on editor
task <id> [delete|done]
task <id> modify [project:<project>] [+tag] [-tag] [+next]
{
// ...
"scripts": {
"start": "serve -p 8083 &;echo $! > .pid",
"stop": "cat .pid | xargs kill"
},
"dependencies": {
"serve": "^1.4.0"
}
// ...
@A
A / bash_cheatsheet.sh
Last active May 27, 2024 20:40
Bash cheatsheet
# strout & stderr
## print stdout & stderr to file
cmd &> file
## pipe stdout & stderr
cmd &| less
# profile
@A
A / time.sh
Created October 22, 2014 11:48
time tail -$((RANDOM/(32767/`wc -l<~/.emotions|tr -d ' '`))) ~/.emotions|head -1
◕‿◕
tail -$((RANDOM/(32767/`wc -l<~/.emotions|tr -d ' '`))) ~/.emotions 0.00s user 0.00s system 88% cpu 0.002 total
head -1 0.00s user 0.00s system 90% cpu 0.002 total
@A
A / pandoc.sh
Last active May 27, 2024 20:32
# Pandoc is awesome!
# http://johnmacfarlane.net/pandoc/
## Download shell documentation as epub book:
pandoc -s -r html https://www.gnu.org/software/bash/manual/bashref.html -o bash.epub
## Download article as markdown:
pandoc -s -r html http://www.farnamstreetblog.com/2014/04/how-complex-systems-fail/ -o ./_drafts/how-complex-systems-fail.md
## Convert markdown sources to many other formats
var isNode = typeof window === 'undefined';
=ie-background-cover($image-path)
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=#{image_path($image-path)}, sizingMethod='scale')
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=#{image_path($image-path)}, sizingMethod='scale')"
background-image: none

Раздражает, что я ничего не могу сделать с треками, которые мне не нравятся в стриме sc. Их можно скрывать так

Можно плагином добавить кнопку крестика, удаляющего трек из стрима, он будет записывать url трека к себе в базу, а затем просто искать треки с урлами из базы при подгрузке стрима и скрывать их, примерно так:

$('a[href="/diversa/murkmusic"]').closest('.soundList__item').hide()
@A
A / bash.sh
Created August 30, 2014 13:45
[root@12time ~]# cat ./start_node
#!/bin/bash
export NODE_ENV=development
export MONGODB=0.0.0.0/justchat-prod
export HOST=82.146.58.73
export PORT=800
export PWD=/www/project
supervisor /www/project/app.js
[root@12time ~]# ./start_node