Skip to content

Instantly share code, notes, and snippets.

@msabramo
msabramo / git_prompt_info.zsh
Created April 11, 2012 00:07
The slowness of my zsh prompt when in a git-svn managed directory was killing me. I improved it by removing the git status stuff that slows it down...
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@ngocdaothanh
ngocdaothanh / gist:3764694
Created September 22, 2012 00:43
Scala Assignment: Recursion
package recfun
import scala.collection.mutable.ListBuffer
import common._
/** https://class.coursera.org/progfun-2012-001/assignment/view?assignment_id=4 */
object Main {
def main(args: Array[String]) {
println("Pascal's Triangle")
for (row <- 0 to 10) {
@sgergely
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
@jonashackt
jonashackt / bash
Last active December 1, 2021 01:45
Remote debugging Spring Boot
### java -jar
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar
### Maven
Debug Spring Boot app with Maven:
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001"
@Zauberfisch
Zauberfisch / audio-switch.sh
Created October 12, 2016 03:44
shell script to switch pulseaudio output device
#!/bin/sh
# based on a script from a now deleted askubuntu answer on this question http://askubuntu.com/questions/71863/how-to-change-pulseaudio-sink-with-pacmd-set-default-sink-during-playback
# the script linked in the answer is still available at https://github.com/mpapis/home_dotfiles/blob/master/bin/mypa though
# dependencies: pulseaudio pacmd awk xargs grep volumeicon
# optional dependencies: zenity (for gui switch)
# this script assumes you are using volumeicon as a tray icon and will restart it on switch
# if you do not use volumeicon you should remove the 2 lines in switch_sink()
@yougg
yougg / proxy.md
Last active July 17, 2024 09:23
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
// code updates are now there:
// https://github.com/Bleuje/processing-animations-code/blob/main/code/spherewave/spherewave.pde
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code (by Kurt Spencer) in another tab is necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
// See the license information at the end of this file.
// View the rendered result at: https://bleuje.com/gifanimationsite/single/spherewave/
@evdcush
evdcush / logseq_install_update.sh
Last active March 8, 2024 00:46
Handy shell script to install and update Logseq on Linux
#!/usr/bin/env bash
# This script comes from Joplin, MIT License Copyright Laurent Cozic:
# https://github.com/laurent22/joplin/blob/dev/Joplin_install_and_update.sh
# Modified here by github.com/evdcush to instead install and update Logseq.
set -e
trap 'handleError' ERR