Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am zuigon on github.
  • I am zuigon (https://keybase.io/zuigon) on keybase.
  • I have a public key whose fingerprint is 0C0E 1CC5 FCCE FCF3 B2E9 791B 6DB4 CA73 9730 1420

To claim this, I am signing this object:

@zuigon
zuigon / 81-thinkpad-dock.rules
Last active August 28, 2015 15:26 — forked from seanf/81-thinkpad-dock.rules
Example ThinkPad docking script for multi-monitor
# Save this file (after modifying ID_VENDOR and ID_MODEL if necessary) as /etc/udev/rules.d/81-thinkpad-dock.rules
# These values seem to work for "ThinkPad Mini Dock Plus Series 3"
SUBSYSTEM=="usb", ACTION=="add|remove", ENV{ID_VENDOR}=="17ef", ENV{ID_MODEL}=="100a", RUN+="/etc/sbin/thinkpad-dock.sh"
Copy message 26131 from [Gmail]/Trash:
WARNING: ERROR attempting to copy message 26131 for account Gmail:Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/offlineimap/folder/Base.py", line 250, in copymessageto
message = self.getmessage(uid)
File "/usr/lib/pymodules/python2.7/offlineimap/folder/IMAP.py", line 204, in getmessage
imapobj.select(self.getfullname(), readonly = 1)
File "/usr/lib/pymodules/python2.7/offlineimap/imaplibutil.py", line 58, in select
raise OfflineImapError(errstr, severity)
OfflineImapError: Error SELECTing mailbox '[Gmail]/Trash', server reply:
('NO', ['System Error (Failure)'])
sudo docker build -t="docker-contao" . # ovo ce potrajati ...
export CONTAO_ID=$(sudo docker run -d -p 8080:80 docker-contao)
export IP_ADDR=$(sudo docker inspect $CONTAO_ID | grep IPAddress | awk '{print $2}' | sed 's/\"//g;s/\,//g')
xdg-open http://HOSTNAME:8080/contao/install.php
[bkrsta@core][$ sudo openvpn --config Downloads/client.ovpn
Sat Dec 6 03:41:50 2014 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 1 2014
Enter Auth Username:bkrsta
Enter Auth Password:
Sat Dec 6 03:41:53 2014 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sat Dec 6 03:41:53 2014 Control Channel Authentication: tls-auth using INLINE static key file
Sat Dec 6 03:41:53 2014 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Dec 6 03:41:53 2014 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Dec 6 03:41:53 2014 LZO compression initialized
Sat Dec 6 03:41:53 2014 Control Channel MTU parms [ L:1574 D:166 EF:66 EB:0 ET:0 EL:0 ]
[bkrsta@core][$ wrk -c 10 -d10 -t4 http://localhost/ ][~ 10:36]
Running 10s test @ http://localhost/
4 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 163.69us 598.67us 18.43ms 99.39%
Req/Sec 14.68k 3.20k 29.67k 83.14%
552164 requests in 10.00s, 477.52MB read
Requests/sec: 55227.58
Transfer/sec: 47.76MB
[bkrsta@core][$ wrk -c 1000 -d10 -t4 http://localhost/ ][~ 10:36]
@zuigon
zuigon / gist:7904cbb2412217fc05c7
Created June 17, 2014 15:30
xmonad skype chat window fix
, className =? "Skype" <&&> hasInside' title " - Skype" <&&> hasInside' title "bkrsta" /=? True --> (doRectFloat $ (W.RationalRect 0 0 (5%6) 1))
root@vps2:~$ python speedtest_cli.py
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Digital Ocean (82.196.4.18)...
Selecting best server based on ping...
Hosted by Solcon (Dronten) [4.33 km]: 12.318 ms
Testing download speed........................................
Download: 909.52 Mbits/s
Testing upload speed..................................................
Upload: 346.30 Mbits/s
[root@vps3 ~]# ping google.com
PING google.com (74.125.224.129) 56(84) bytes of data.
64 bytes from lax02s20-in-f1.1e100.net (74.125.224.129): icmp_seq=1 ttl=57 time=0.348 ms
64 bytes from lax02s20-in-f1.1e100.net (74.125.224.129): icmp_seq=2 ttl=57 time=0.280 ms
64 bytes from lax02s20-in-f1.1e100.net (74.125.224.129): icmp_seq=3 ttl=57 time=0.273 ms
64 bytes from lax02s20-in-f1.1e100.net (74.125.224.129): icmp_seq=4 ttl=57 time=0.288 ms
64 bytes from lax02s20-in-f1.1e100.net (74.125.224.129): icmp_seq=5 ttl=57 time=0.279 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4375ms
using System;
namespace LV11
{
class Zarulja {
private bool stanje;
public Zarulja(){
stanje = false;
}