Skip to content

Instantly share code, notes, and snippets.

View hoshsadiq's full-sized avatar

Hosh hoshsadiq

  • 127.0.0.1
View GitHub Profile
@domenkozar
domenkozar / autovpn.py
Created January 1, 2012 16:00 — forked from anonymous/autovpn.py
AutoVPN for NetworkManager
#!/usr/bin/env python
"""
Copyright 2011 Domen Kozar. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 16, 2024 19:37
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@dz0ny
dz0ny / m3u_to_tvheadend.js
Created November 28, 2012 18:26
IPTV m3u to tvheadend configuration
#!/usr/bin/env node
var fs = require("fs");
var tv = fs.readFileSync("siol.m3u", "UTF-8").split("\n\n");
var tags = [];
var iptvs = [];
var channels = [];
function trim(s) {
s = s.replace(/(^\s*)|(\s*$)/gi,"");
@eridal
eridal / Compiler.java
Last active August 9, 2023 13:26
Java to PHP Compilation
package j2p;
import japa.parser.JavaParser;
import japa.parser.ParseException;
import japa.parser.ast.CompilationUnit;
import japa.parser.ast.ImportDeclaration;
import japa.parser.ast.PackageDeclaration;
import japa.parser.ast.body.BodyDeclaration;
import japa.parser.ast.body.ClassOrInterfaceDeclaration;
import japa.parser.ast.body.FieldDeclaration;
@dnozay
dnozay / _Jenkins+Script+Console.md
Last active June 5, 2024 17:43
jenkins groovy scripts collection.
@mubbashir
mubbashir / Jenkins+Script+Console.md
Last active October 9, 2023 07:10 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@ssokolow
ssokolow / x11_watch_active_window.py
Last active February 6, 2024 22:50
python-xlib example which reacts to changing the active window
#!/usr/bin/env python
"""python-xlib example which reacts to changing the active window/title.
Requires:
- Python
- python-xlib
Tested with Python 2.x because my Kubuntu 14.04 doesn't come with python-xlib
for Python 3.x.
@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
#!/bin/bash
# Will maximize the current window to a new desktop, or, if the window is not
# Use your window manager's keybindings to attach this script to the key combination of your choice
# Requires the following packages in Ubuntu:
# xdotool x11-utils wmctrl
function goFull() {
echo $1
DESKTOP=`wmctrl -d | cut -d \ -f 1 | tail -1`