Skip to content

Instantly share code, notes, and snippets.

MohamedAlaa / tmux-cheatsheet.markdown
Last active June 2, 2023 18:45
tmux shortcuts & cheatsheet
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
willurd /
Last active June 2, 2023 05:18
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
jeroen-meijer /
Created September 15, 2019 13:00
Flutter Clean Recursive - Clear up space on your hard drive by cleaning your Flutter projects. This script searches for all Flutter projects in this directory and all subdirectories and runs 'flutter clean'. Note: may take a long time for folders with large amounts of projects.
# To run, download the script or copy the code to a '.sh' file (for example '') and run like any other script:
# sh ./
# or
# sudo sh
echo "Flutter Clean Recursive (by jeroen-meijer on GitHub Gist)"
echo "Looking for projects... (may take a while)"
rothgar / main.yml
Last active May 23, 2023 17:50
Generate /etc/hosts with Ansible
View main.yml
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
# Will include all hosts the playbook is run on.
# Inspired from
- name: "Build hosts file"
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present
when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all']
erickok /
Last active May 11, 2023 14:25
Loading a self-signed SSL certificate .crt file and packaging it into a SSLSocketFactory for use with a HttpsURLConnection.
// Usage example...
HttpsURLConnection connection = (HttpsURLConnection) new URL("").openConnection();
private static SSLSocketFactory buildSslSocketFactory(Context context) {
// Add support for self-signed (local) SSL certificates
// Based on
try {
kevingessner / gist:9509148
Last active April 27, 2023 15:45
Responsive emails that really work -- From Etsy's Code As Craft blog:
View gist:9509148
<style type="text/css">
table table {
width: 600px !important;
table div + div { /* main content */
width: 65%;
float: left;
cridenour / gist:74e7635275331d5afa6b
Last active March 12, 2023 12:24
Setting up Vim as your Go IDE
View gist:74e7635275331d5afa6b

Setting up Vim as your Go IDE

The final IDE


I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

stevenringo /
Created December 3, 2017 23:01
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

gasolin / gist:9300f5f9276b2df884c80da3e2c54ffc
Last active March 3, 2022 20:32
Install Android Simulator
View gist:9300f5f9276b2df884c80da3e2c54ffc

Install Android SDK on macOS

Install homebrew

brew cask install adoptopenjdk8
brew cask install android-sdk
vumaasha /
Created September 29, 2013 20:51
Installing solr on jetty 9. Downloads jetty and solr from the given urls and installs the sample core collection1 in solr in jetty 9. Also creates a use for jetty and installs jetty as a service. *Run the script as super user or using sudo in ubuntu.*
# set the configuration variables below, before running the script
# get the solr nightly build download link from