Skip to content

Instantly share code, notes, and snippets.

View zygisx's full-sized avatar

Žygimantas Gatelis zygisx

  • MobileLife
  • Vilnius, Lithuania
  • X @zygis_
View GitHub Profile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@zygisx
zygisx / .tmux.conf
Created March 28, 2014 16:42
Tmux config
# bind ctrl-a
set -g prefix C-a
# reload configuration
#bind r source-file ~/.tmux.conf; display ".tmux.conf Reloaded."
# windows numbering starts from 1 instead of zero
set -g base-index 1
# same with panels
set -g pane-base-index 1
@zygisx
zygisx / .bash_aliases
Created March 28, 2014 16:41
Bash aliases
# to color bash with git branch
GIT_PS1_SHOWDIRTYSTATE=true
PS1='\[\033[32m\]\u:\[\033[00m\]\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ '
alias gnome-louncher="gnome-desktop-item-edit ~/apps/ --create-new"
@zygisx
zygisx / .gitconfig
Created March 28, 2014 16:39
Gitconfig
[user]
name = Zygimantas Gatelis
email = zygis.gg@gmail.com
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = true
[core]
@zygisx
zygisx / main.py
Created May 5, 2013 09:59
Python main
def main():
pass
if __name__ == "__main__":
main()
@zygisx
zygisx / spinner_demo.py
Last active December 15, 2015 10:09
spinner run js code
import spynner
browser = spynner.Browser(debug_level=spynner.INFO)
browser.create_webview()
browser.show()
browser.load("https://www.imleagues.com/Login.aspx")
browser.runjs('$("[schid=e002364c7b414cfd8195be06fb7707ba]").click()');
browser.wait(10.0)
@zygisx
zygisx / test_suite.py
Created March 11, 2013 15:09
Python unnitest custom TestSuite
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import unittest
class Task_2_TestSuite(unittest.TestSuite):
def add(self, test_case):
tests = unittest.defaultTestLoader.loadTestsFromTestCase(test_case)
@zygisx
zygisx / run_tests.py
Created March 11, 2013 15:06
Run Python unnitests
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import sys
import unittest
from tests.test_suite import TestSuite
def main():
suite = TestSuite()
public static void AppendQuestions(string question,
string answer, string case1, string case2, string difficulty)
{
try {
XmlDocument XmlDoc = new XmlDocument();
XmlDoc.Load(XML_FILE_PATH);
XmlElement newElem = XmlDoc.CreateElement("task");
XmlAttribute difficultyAttribute = XmlDoc.CreateAttribute("stage");
@zygisx
zygisx / cloneexample.java
Created November 4, 2011 20:35
Pagrindines klases klonavimas
@Override
public Customs clone() throws CloneNotSupportedException {
Customs result = (Customs) super.clone();
/* clone all officers */
result.officers = (ArrayList<CustomsOfficer>) officers.clone();
for (CustomsOfficer o : result.officers) {
o = o.clone();
}
/* clone all inspections */
result.inspections = (ArrayList<Inspection>) inspections.clone();