Skip to content

Instantly share code, notes, and snippets.

View mgdelacroix's full-sized avatar
🎧
Working from home

Miguel de la Cruz mgdelacroix

🎧
Working from home
View GitHub Profile
@osima
osima / fileCopy.groovy
Created August 24, 2011 02:26
binary file copy example in groovy
copy = { File src,File dest->
def input = src.newDataInputStream()
def output = dest.newDataOutputStream()
output << input
input.close()
output.close()
}
@neuro-sys
neuro-sys / dwmconfig.h
Last active September 27, 2023 18:20
dwm volume control
/**
* config.h
* ALT + F11 | F12
*/
static const char *upvol[] = { "amixer", "set", "Master", "3+", NULL };
static const char *downvol[] = { "amixer", "set", "Master", "3-", NULL };
static const char *mutevol[] = { "amixer", "set", "Master", "toggle", NULL };
static Key keys[] = {
@areina
areina / emacs-email-setup.md
Created October 12, 2012 15:00
Manage your email in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
@mariogarcia
mariogarcia / .ctags
Created October 2, 2013 10:24
File patterns to enable ctags on Vim
--langdef=groovy
--langmap=groovy:.groovy
--regex-groovy=/^[ \t]*[(private|public|protected) ( \t)]*[A-Za-z0-9_<>]+[ \t]+([A-Za-z0-9_]+)[ \t]*\(.*\)[ \t]*\{/\1/f,function,functions/
--regex-groovy=/^[ \t]*def[ \t]+([A-Za-z0-9_]+)[ \t]*\=[ \t]*\{/\1/f,function,functions/
--regex-groovy=/^[ \t]*private def[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/v,private,private variables/
--regex-groovy=/^[ \t]*def[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/u,public,public variables/
--regex-groovy=/^[ \t]*[abstract ( \t)]*[(private|public) ( \t)]*class[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/c,class,classes/
--regex-groovy=/^[ \t]*[abstract ( \t)]*[(private|public) ( \t)]*enum[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/c,class,classes/
@mariogarcia
mariogarcia / GradleGroovyConsole
Created February 4, 2014 08:39
Launching a Groovy Console with your Gradle classpath
task(console, dependsOn: 'classes', type: JavaExec) {
main = 'groovy.ui.Console'
classpath = sourceSets.main.runtimeClasspath
}
@travisbhartwell
travisbhartwell / nix-shell-shebang.md
Last active March 29, 2024 19:55
nix-shell and Shebang Lines

NOTE: a more up-to-date version of this can be found on my blog

nix-shell and Shebang Lines

A few days ago, version 1.9 of the Nix package manager was released. From the release notes:

nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.