Skip to content

Instantly share code, notes, and snippets.

View ibrahemesam's full-sized avatar
🐧
I use Arch btw

Ibrahem Essam ibrahemesam

🐧
I use Arch btw
View GitHub Profile
@stevenliebregt
stevenliebregt / pyqt5-eventfilter-touch-example.py
Created June 15, 2018 14:52
PyQt5 Example of the eventFilter, and a TouchEvent capture.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from PyQt5.QtCore import QEvent
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWidgets import QMainWindow

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone [email protected]:<hash>.git     # or with ssh
@roxlu
roxlu / RendezVousClient.cpp
Created May 25, 2016 19:34
STUN + RendezVous Server / Cliet
#include <poly/Log.h>
#include <RendezVousClient.h>
#include <RendezVousTypes.h>
namespace poly {
/* -------------------------------------------------------------- */
RendezVousClientSettings::RendezVousClientSettings()
:rv_port(0)
@techtonik
techtonik / sha1.py
Last active March 3, 2024 16:06
Calculate SHA-1 of a file in Python
#!/usr/bin/env python
"""
usage: python -m sha1 <filename>
"""
import sys
import hashlib
# --- these fields are required for packaging
__version__ = '1.0'
__author__ = 'anatoly techtonik <[email protected]>'
@addorange
addorange / getUrlVars
Created August 1, 2013 20:10
getUrlVars from url request
// Read a page's GET URL variables and return them as an associative array.
function getUrlVars()
{
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net