This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update: found it: it's the OSX.pirrit virus, see here: | |
http://www.cybereason.com/cybereason-labs-analysis-the-minds-behind-the-osx-pirrit/ | |
Saw a bunch of those running (as root) in htop: | |
$ ls /etc/*.sh | |
/etc/Dicyemida.sh* | |
/etc/Fulah.sh* | |
/etc/Gothism.sh* | |
/etc/audile.sh* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vim() { | |
/usr/bin/vim $* | |
cd $(cat /tmp/nvim-cwd) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! OnTabEnter(path) | |
if isdirectory(a:path) | |
let dirname = a:path | |
else | |
let dirname = fnamemodify(a:path, ":h") | |
endif | |
execute "tcd ". dirname | |
endfunction() | |
autocmd TabNewEntered * call OnTabEnter(expand("<amatch>")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" Usage: | |
* Start neovim with NVIM_LISTEN_ADDRESS=/tmp/neovim | |
* Install selenium and neovim Python packages from pypi | |
* Run autorefresh URL | |
* In neovim, map a kep to send the event: | |
nnoremap ,m :w<cr>:call rpcnotify(0, "refresh")<cr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" One argument: | |
function! Foo(foo) | |
" Do something with a:foo | |
endfunction | |
command! -nargs=1 -complete=file Foo :call Foo("<args>") " <- note the quotes | |
" Two arguments: | |
function! Foo2(foo, bar) | |
" Do something with a:foo and a:bar | |
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Method; | |
Foo foo = new Foo(); | |
Method method = Foo.class.getDeclaredMethod("private") | |
method.setAccessible(true); | |
method.invoke(foo); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export SOURCE_DATE_EPOCH=$(git log -1 --format=%ct) | |
# This sets SOURCE_DATE_EPOCH to the date of the last commit, (it's even better if it's a | |
# signed tag of course), which is perfect for reproducible builds. | |
# See here for more info : https://reproducible-builds.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From the command line: | |
c:\pouet.exe | |
segfault | |
Exit code: 0xc0000005 | |
# From a jenkins slave connected as a Windows service: | |
c:\Users\xxxx\jenkins\workspace\pouet>C:\pouet.exe | |
segfault | |
Exit code: 0xff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import subprocess | |
import packaging.version | |
import tabulate | |
out = subprocess.check_output(["git", "tag"]).decode("UTF-8") | |
current_branch = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]) | |
if not current_branch: | |
sys.exit("Not on a branch") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in test_qibuild_configure.py | |
def test_qibuild_configure(tmpdir): | |
# do stuff in tmpdir | |
assert rc == 0 |