- Emacs: shell-command-on-region
- Command: tmux load-buffer -
export EVENT_NOEPOLL=1 tmux/tmux#416
export EVENT_NOEPOLL=1 tmux/tmux#416
On supervisor: | |
lvextend -L50G /dev/vg_kvmhost01/test-01.img | |
virsh qemu-monitor-command util-02 --hmp "info block" | |
virsh qemu-monitor-command util-02 --hmp "block_resize drive-virtio-disk0 50G" | |
On VM: | |
http://unix.stackexchange.com/a/42910 |
package main | |
import ( | |
"fmt" | |
"golang.org/x/crypto/openpgp" | |
"os" | |
) | |
func main() { | |
keyRingReader, err := os.Open("signer-pubkey.asc.txt") |
I needed to be able to filter which items of a ManyRelatedField
were returned, based on some attributes of the request user. Normally, all items in the relationship are returned, however I was able to override the ManyRelatedField.to_attribute()
function to enable additional filtering of the relationship.
#!/usr/bin/env python3 | |
import hashlib | |
import os | |
import base64 | |
from datetime import datetime | |
username = "admin" |
function reverseIp6 { | |
echo "$1" | awk -F: 'BEGIN {OFS=""; }{addCount = 9 - NF; for(i=1; i<=NF;i++){if(length($i) == 0){ for(j=1;j<=addCount;j++){$i = ($i "0000");} } else { $i = substr(("0000" $i), length($i)+5-4);}}; print}' | rev | sed -e "s/./&./g" | |
} | |
$(reverseIp6 "2001:db8:85a3::8a2e:370:7334")"ip6.arpa." | |
#Result: 4.3.3.7.0.7.3.0.e.2.a.8.0.0.0.0.0.0.0.0.3.a.5.8.8.b.d.0.1.0.0.2.ip6.arpa. |
package main | |
// Based on documentation found here: http://docs.rackspace.com/files/api/v1/cf-devguide/content/Create_TempURL-d1a444.html | |
import ( | |
"crypto/hmac" | |
"crypto/sha1" | |
"encoding/hex" | |
"fmt" | |
"github.com/ncw/swift" |
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/armon/mdns" | |
"sync" | |
) | |
func channelHandler(wg sync.WaitGroup, ch <-chan mdns.ServiceEntry) { |
""" Python IMAP with TLS/SSL support """ | |
## | |
## Author: Alexander Brill <[email protected]> | |
## Copyright (C) 2004 Alexander Brill | |
## | |
## This program is free software; you can redistribute it and/or | |
## modify it under the terms of the GNU General Public License | |
## as published by the Free Software Foundation; either version 2 | |
## of the License, or (at your option) any later version. | |
## |