Skip to content

Instantly share code, notes, and snippets.

View programandoconro's full-sized avatar
💭
Programming is art, science and tech

Ro programandoconro

💭
Programming is art, science and tech
View GitHub Profile
@zanshin
zanshin / .zshrc
Created August 12, 2011 19:09
My .zshrc file
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#export ZSH_THEME="robbyrussell"
export ZSH_THEME="zanshin"

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

anonymous
anonymous / Python Wifi Connectivity Script For Linux
Created July 14, 2012 20:54
Easy Wifi Connection via Python
#!/bin/python
#
# Connects to a Wifi network
#
import os
def commandExists(command):
def canExecute(file):
return os.path.isfile(file) and os.access(file, os.X_OK)
@ramn
ramn / netcat_over_ssh.sh
Created September 27, 2012 14:27
Send a file with netcat over ssh tunnel
### Sending a file
# BSD nc syntax
cat myDocument.pdf | ssh me.myserver.com nc -l 20000
# Hobbit nc syntax - try this one if unsure!
cat myDocument.pdf | ssh me.myserver.com nc -l -p 20000
### Receiving a file
nc me.myserver.com 20000 > myDocument.pdf
@samueljackson92
samueljackson92 / otsu.py
Last active December 24, 2020 04:15
Otsu's method of thresholding. Partially based on the implementation shown at: http://www.labbookpages.co.uk/software/imgProc/otsuThreshold.html
#!/usr/local/bin/python
#######################################################
# Otsu's Method
# Author: Samuel Jackson ([email protected])
# Date: 21/07/2013
# Description: Performs Otsu's method of thresholding
# using the between class variance.
#######################################################
@TylerFisher
TylerFisher / hosting-on-github.md
Last active October 7, 2025 14:02
Basic steps for hosting on Github

Hey there, apparently people are still using this Gist from 2013! It's out of date! Consult the Github docs.

Steps for Hosting a Website on GitHub

  1. Create a GitHub account on github.com.
  2. Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
  3. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
  4. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  5. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level
@barrysteyn
barrysteyn / README.md
Last active January 22, 2023 22:43
C/C++ Examples For Understanding

Introduction

These toy examples are for helping with understanding C/C++. There is an excellent C++ samples site which demonstrates many useful things.

@mjohnsullivan
mjohnsullivan / TimerActivity.java
Created July 9, 2015 13:15
Example of how to create a long running timer service that survives activity destruction by moving to the foreground, and back to the background when a new activity bind to it.
//
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
@squarism
squarism / iterm2.md
Last active November 9, 2025 11:19
An iTerm2 Cheatsheet

In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So + D does not mean hold shift. + Shift + D does of course.

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
@subfuzion
subfuzion / curl.md
Last active November 6, 2025 06:24
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.