Skip to content

Instantly share code, notes, and snippets.

@AxeemHaider
AxeemHaider / .bashrc
Last active June 13, 2022 09:51
Show Git branches and status in Ubuntu Terminal
# Adds the current branch to the bash prompt when the working directory is
# part of a Git repository. Includes color-coding and indicators to quickly
# indicate the status of working directory.
git_branch() {
# -- Finds and outputs the current branch name by parsing the list of
# all branches
# -- Current branch is identified by an asterisk at the beginning
# -- If not in a Git repository, error message goes to /dev/null and
@johannestaas
johannestaas / _namerator.py
Last active July 18, 2017 15:59
Namerator - Name generator PoC based on text patterns
'''
namerator
=========
Name generator, by generating characters based on frequencies of letter patterns
Usage:
$ python namerator.py -n 5 elf_names.txt
egil-gonamilin
taedhorilie
@ibanez270dx
ibanez270dx / scraper.rb
Last active September 27, 2017 14:35
Use Capybara w/ Poltergeist (PhantomJS) to scrape the text content from the body of an HTML page located at the given URL.
#!/usr/bin/env ruby
require 'capybara'
require 'capybara/poltergeist'
class Scraper
include Capybara::DSL
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new app,
phantomjs_options: ['--load-images=no','--ignore-ssl-errors=yes'],
js_errors: false,
@mdaniel
mdaniel / hidemyass_proxylist.py
Created May 10, 2015 20:17
Extracts the proxy list from proxylist.hidemyass.com
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
__docformat__ = 'reStructureText'
import logging
import re
import sys
import html5lib
from xml.etree.ElementTree import tostring
@rtt
rtt / tinder-api-documentation.md
Last active May 5, 2024 15:28
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@daveadams
daveadams / install-ansible.sh
Created February 10, 2014 14:13
Install ansible within pyenv
#!/bin/bash -e
which pyenv &>/dev/null \
|| { echo "ERROR: pyenv not found" >&2; exit 1; }
grep -qFx 2.7.6 <(pyenv versions --bare) \
|| { echo "ERROR: python 2.7.6 not installed; run 'pyenv install 2.7.6'" >&2; exit 1; }
export PYENV_VERSION=2.7.6
@julionc
julionc / 00.howto_install_phantomjs.md
Last active April 26, 2024 09:13
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@mtowers
mtowers / README.md
Last active February 24, 2022 17:19
Google Analytics Website Visitor Count Widget for Dashing with OAuth2 Authentication
@mt3
mt3 / pandas-heroku.md
Created September 8, 2012 23:10 — forked from nicolashery/pandas-heroku.md
Deploy Python app using Pandas on Heroku

Deploy Python app using Pandas on Heroku

2012-09-08

This document explains how to deploy a Python app that uses the Pandas library on Heroku.

Heroku builds Numpy (one of Pandas' requirements) fine. However, when trying to deploy an app with both numpy and pandas in its requirements.txt file (or even just pandas), for some reason it fails