This file contains hidden or 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
#!/bin/bash | |
url= 'http://peppes.notch.no/news/draw' | |
common_opts=( | |
--silent # Silent or quiet mode. Do not show progress meter or error messages. | |
--request POST # Specifies a custom request method to use when communicating with the HTTP server | |
--header 'Content-Type: application/x-www-form-urlencoded' # Extra header to include in the request when sending HTTP to a server. | |
--header 'Origin: herro' | |
) |
This file contains hidden or 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! Freqs2(list) | |
let freqs = {} | |
call map(copy(a:list), 'extend(freqs, { v:val : 0 })') | |
" for line in getline(1, '$') | |
" call map(freqs, 'v:val + ( line =~ ''\<'' . v:key . ''\>'' )') | |
" endfor | |
call map(getline(1, '$'), 'map(freqs, "v:val + (''" . v:val . "'' =~ ''\\<'' . v:key . ''\\>'' )")') | |
return freqs | |
endfunction |
This file contains hidden or 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
$ grep -o 'NO_[A-Z]\+' Makefile | sort -u | |
NO_APPLE | |
NO_CROSS | |
NO_CURL | |
NO_D | |
NO_DARWIN | |
NO_DEFLATE | |
NO_EXPAT | |
NO_FAST | |
NO_FINK |
This file contains hidden or 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
#!/bin/bash | |
shopt -s extglob | |
branchpatterns=( 'refs/heads/**' ) | |
# Add remote branches too | |
if [[ $1 = -a ]]; then | |
branchpatterns+=( 'refs/remotes/**' ) | |
fi |
This file contains hidden or 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
# HG changeset patch | |
# User Øystein Walle <[email protected]> | |
# Date 1398859266 -7200 | |
# Wed Apr 30 14:01:06 2014 +0200 | |
# Node ID 3f753571cdc8d14f29b6df5763d7c4d39bcde74a | |
# Parent 01f2b7e6b33ca4da4fbe2a5b8e9184ea2749d64e | |
Add strptime() as a VimL function | |
The C function strptime() can be used as a "reverse strftime()" and fill a | |
struct of type tm which holds the interpreted results. strptime() in VimL is |
This file contains hidden or 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
echo "LANG='en_US.UTF-8'" > /etc/locale.conf | |
echo 'KEYMAP=no' > /etc/vconsole.conf | |
echo worklappie > /etc/hostname | |
ln -s /usr/share/zoneinfo/Europe/Oslo /etc/localtime | |
sed -i -e 's/^#en_US.UTF-8/en_US.UTF-8/' -e 's/^#nb_NO.UTF-8/nb_NO.UTF-8/' /etc/locale.gen | |
locale-gen | |
mkinitcpio -p linux | |
grub-install --target=i386-pc --recheck --debug /dev/sda | |
grub-mkconfig -o /boot/grub/grub.cfg | |
passwd |
This file contains hidden or 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
alsa-utils 1.0.27.2-1 | |
bash 4.3.008-2 | |
bzip2 1.0.6-5 | |
bzr 2.6.0-1 | |
coreutils 8.22-4 | |
cronie 1.4.11-1 | |
cryptsetup 1.6.4-1 | |
device-mapper 2.02.106-1 | |
dhcpcd 6.3.2-1 | |
dialog 1:1.2_20140219-1 |
This file contains hidden or 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
/unset plugins.var.python.complete_words.key_backward | |
/unset plugins.var.python.complete_words.key_forward | |
/set plugins.var.python.complete_words.empty_cmd "/buffer -1" | |
/set plugins.var.python.complete_words.empty_cmd_rev "/buffer +1" | |
/set plugins.var.python.complete_words.lines "50" | |
/set plugins.var.python.complete_words.raw_lines "150" | |
/set plugins.var.python.complete_words.word_definition "\w+" | |
/set plugins.var.python.complete_words.word_start "\b\w+" |
This file contains hidden or 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
On branch master | |
All conflicts fixed but you are still merging. | |
(use "git commit" to conclude merge) | |
Changes to be committed: | |
... | |
... | |
... |
This file contains hidden or 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
$ sudo systemctl poweroff | |
Failed to start poweroff.target: Connection timed out | |
$ sudo shutdown -h now | |
Failed to start poweroff.target: Activation of org.freedesktop.systemd1 timed out | |
Failed to open /dev/initctl: No such device or address | |
Failed to talk to init daemon. |