Skip to content

Instantly share code, notes, and snippets.

Avatar

Dimitri John Ledkov xnox

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am xnox on github.
  • I am xnox (https://keybase.io/xnox) on keybase.
  • I have a public key ASBvjajfbjsKg63UPOO7h6gvXKlFb4Jr_mQX1DNPwI0q3go

To claim this, I am signing this object:

@xnox
xnox / second
Last active Aug 29, 2015
console colors
View second
##source http://unix.stackexchange.com/questions/73807/change-colors-in-console-virtual-terminal
/sys/module/vt/parameters/default_red
/sys/module/vt/parameters/default_grn
/sys/module/vt/parameters/default_blu
clr () {
clear # GFX bug otherwise
setterm -regtabs 4
Color_names="bla red gre yel blu mag cya whi"
View lpshell
In [1]: lp
Out[1]: <launchpadlib.launchpad.Launchpad at 0x7f49ecc649b0>
In [2]: lp.distributions
Out[2]: <launchpadlib.launchpad.DistributionSet at 0x7f49ddf0e630>
In [3]: lp.distributions['ubuntu']
Out[3]: <distribution at https://api.launchpad.net/1.0/ubuntu>
In [4]: lp.distributions['ubuntu'].display_name
View gist:8124749
package main
import "fmt"
func split(sum int) (x, y int) {
x = sum * 4 / 9
y = sum - x
return
}
View apt-avahi-discover.py
#!/usr/bin/python
#
# use avahi to find a _apt_proxy._tcp provider and return
# a http proxy string suitable for apt
import socket
from subprocess import Popen, PIPE
def is_ipv6(a):
You can’t perform that action at this time.