Skip to content

Instantly share code, notes, and snippets.

View kmonsoor's full-sized avatar
:octocat:

Khaled Monsoor kmonsoor

:octocat:
View GitHub Profile
@JoaquimLey
JoaquimLey / restart-ssh-gist.sh
Created August 10, 2016 23:02
Restart ssh-agent
killall ssh-agent; eval `ssh-agent`
anonymous
anonymous / btc_hue.markdown
Created December 2, 2013 05:39
BTC Philip's Hue Over/Under Colors

#BTC Ticker Light This script updates one of your Philip's Hue lights to be either red or green depending on if the current price of bitcoin is below or above the 24 hour weighted price.

The light

##Install Dependencies
easy_install install beautifulhue

##The Script
Save this to a python file after customizing your Philip's Hue Bridge ip, username, and light_id.

@ttycelery
ttycelery / revip.py
Created March 10, 2018 07:38
RevIP: Simple Reverse IP Lookup Tool
#!/usr/bin/python
# - RevIP
# | Date: 10/03/2018
# | Author: P4kL0nc4t
# | Description: simple reverse IP lookup tool that combines multiple API to achieve effective result.
import requests
import sys
requests.packages.urllib3.disable_warnings()
from socket import gethostbyname
from sre_parse import Pattern, SubPattern, parse as sre_parse
from sre_compile import compile as sre_compile
from sre_constants import BRANCH, SUBPATTERN
class Scanner(object):
def __init__(self, tokens, flags=0):
subpatterns = []
pat = Pattern()
@kmonsoor
kmonsoor / parallel_rss_download.py
Last active February 5, 2022 20:30
Download contents by grabbing links from a given RSS-feed. Works over HTTP,FTP,HTTPS protocol transparently. Currently, works on Linux, Mac OSX, and possibly on other Unix as well. But, _NOT_ on Windows yet
#!/usr/bin/env python2.7
"""
Parallel RSS-Feed Downloader
----------------------------
Download contents by grabbing links from a given RSS-feed.
Works over HTTP,FTP,HTTPS protocol transparently.
Currently, works on Linux, Mac OSX, and possibly on other Unix as well.
But, _NOT_ on Windows * yet.
@abernardobr
abernardobr / Install Graphics Magick on CentOS 7
Last active December 21, 2021 22:43
Install Graphics Magick on CentOS 7
# Get Graphics Magick
> cd /
> mkdir /dowload
> cd /download
> wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/GraphicsMagick-LATEST.tar.gz
> tar -xzvf GraphicsMagick-LATEST.tar.gz
> cd GraphicsMagick-1.3.21 (or the lastest graphics magick)
# Install Graphics Magick
## Get libs
@nuhil
nuhil / js.md
Last active November 20, 2021 18:06
Javascript Handbook
# ~/.gitconfig from @boblet
# initially based on http://rails.wincent.com/wiki/Git_quickstart
[core]
excludesfile = /Users/oli/.gitignore
legacyheaders = false # >git 1.5
quotepath = false
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
pager = less -r
# if ↑ doesn’t work, try: pager = less -+$LESS -FRX
@rodricios
rodricios / summarize.py
Last active November 18, 2020 17:21
Flipboard's summarization algorithm, sort of
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
pip install networkx distance pattern
In Flipboard's article[1], they kindly divulge their interpretation
of the summarization technique called LexRank[2].
@dgerod
dgerod / custom_run.py
Last active June 19, 2019 15:12
The %my_run command execute a script in IPython as %run does but searching the file in the user path in addition to the python path.
# =======================================================================================
# Startup file with magic functions: %my_run, %add_custom_path, %clean_custom_path and
# %show_custom_path, which runs stuff in the python path as well as user specified paths.
#
# The %my_run command executes a script as %run does but searching the script in
# the user path in addition to python path.
#
# ---------------------------------------------------------------------------------------
# This is a modification of the code done by Gaute Hope <gaute.hope@nersc.no> due to
# IPython issue 101