Skip to content

Instantly share code, notes, and snippets.

View usmanakram232's full-sized avatar
:octocat:
Do not be afraid of devs - we don't eat people, at least usually we don't.

wolfi3 usmanakram232

:octocat:
Do not be afraid of devs - we don't eat people, at least usually we don't.
View GitHub Profile
@schacon
schacon / gist:942899
Created April 26, 2011 19:19
delete all remote branches that have already been merged into master
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete
@bclinkinbeard
bclinkinbeard / release.sh
Created November 1, 2011 20:22
Bash script to automate the Git Flow tag/release process
#!/bin/bash
# current Git branch
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
# v1.0.0, v1.5.2, etc.
versionLabel=v$1
# establish branch and tag name variables
devBranch=develop
@paulirish
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@rose00
rose00 / RawTypeArrayFix.java
Created December 2, 2011 22:05
demonstration of removing generic array warnings
import java.util.List;
/*
* Test program to show how to remove warnings from generic array construction.
* First step: Remove any raw types, by adding <?> as needed.
* Second step: Add a cast if needed, to the specific non-wildcard type.
* Third step: Suppress "unchecked" warnings on the cast.
* The point of the first step is to remove the "rawtypes" warning
* cleanly, without resorting to an additional warning suppression.
* Note that every use of @SuppressWarnings should have a comment.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 24, 2024 17:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jlangridge
jlangridge / begin.sh
Last active August 9, 2018 06:34
Short script to update jira and branch for new issues
#!/bin/sh
#Requires Jira CLI, from https://marketplace.atlassian.com/download/plugins/org.swift.atlassian.cli/version/110
JIRAUSER=[Username]
JIRAPASSWORD=******
JIRASERVER=http://[Jira address]
DEVELOPMENT_HOME=[Git repo (local)]
JIRA_CLI_HOME=/c/Atlassian/jira-cli-3.0.0
function callJira {
java -jar $JIRA_CLI_HOME/lib/jira-cli-3.0.0.jar --server $JIRASERVER --user $JIRAUSER --password $JIRAPASSWORD "$@"
@jonschoning
jonschoning / config
Created March 22, 2013 05:41
sample i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@jpouellet
jpouellet / zbell.sh
Last active November 24, 2023 10:49
Makes Zsh print a bell when long-running commands finish. I use this in combination with i3 and throw big compile jobs (or whatever it may be) into another workspace to get a nice visual notification (workspace indicator turns red) when it's done so I don't need to waste time regularly checking on it.
#!/usr/bin/env zsh
# This script prints a bell character when a command finishes
# if it has been running for longer than $zbell_duration seconds.
# If there are programs that you know run long that you don't
# want to bell after, then add them to $zbell_ignore.
#
# This script uses only zsh builtins so its fast, there's no needless
# forking, and its only dependency is zsh and its standard modules
#