This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #https://wiki.archlinux.org/index.php/Core_utilities#Colored_output_when_reading_from_stdin | |
| t=$(tempfile) | |
| trap "rm '$t'" EXIT | |
| script -q -c "$*" "$t" > /dev/null | |
| stty sane |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 2acd388b62d527fd2e845aa58cc3784142ac1a7f Mon Sep 17 00:00:00 2001 | |
| From: Yuval Kogman <nothingmuch@woobling.org> | |
| Date: Sun, 23 Sep 2012 23:09:25 +0200 | |
| Subject: [PATCH] Push PAD futzing to setup_frame | |
| - during parse method all SvFAKEs which correspond to slots have their offsets | |
| saved in a ptable | |
| - the frame setup code will alias these slots to the pad | |
| - pad ops are now back to normal behavior |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ 326.259124] ------------[ cut here ]------------ | |
| [ 326.259172] kernel BUG at /home/apw/COD/linux/fs/btrfs/volumes.c:2788! | |
| [ 326.259220] invalid opcode: 0000 [#1] SMP | |
| [ 326.259257] Modules linked in: zram(C) rfcomm bnep bluetooth snd_hda_codec_analog binfmt_misc snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi i915 snd_rawmidi psmouse snd_seq_midi_event snd_seq drm_kms_helper drm snd_timer i2c_algo_bit snd_seq_device snd dcdbas coretemp ppdev soundcore snd_page_alloc microcode serio_raw parport_pc video mei(C) mac_hid lp parport ses enclosure usbhid hid uas usb_storage e1000e btrfs zlib_deflate libcrc32c | |
| [ 326.259663] | |
| [ 326.259678] Pid: 3266, comm: btrfs Tainted: G C 3.4.4-030404-generic #201206221555 Dell Inc. OptiPlex 755 /0GM819 | |
| [ 326.259777] EIP: 0060:[<f873fc7a>] EFLAGS: 00010246 CPU: 0 | |
| [ 326.259840] EIP is at btrfs_balance+0x55a/0x560 [btrfs] | |
| [ 326.259878] EAX: ffffff00 EBX: ffffffef ECX: 00000052 EDX: f714645c | |
| [ 326.259923] ESI: dbdd7a00 EDI: 00000000 EB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ajaxify_forms = function() { | |
| $('form.validate').validate({ | |
| debug: true, | |
| submitHandler: function (form) { | |
| var before_submit = $(form).attr('beforeSubmit'); | |
| if ( before_submit.length ) { | |
| var f; | |
| eval("f = function () {" + before_submit + "}"); | |
| f.apply(form, []); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _update_prompt () { | |
| if [ -z "$_dumb_prompt" ]; then | |
| # if $_dumb_prompt isn't set, do something potentially expensive, e.g.: | |
| git status --porcelain | perl -ne 'exit(1) if /^ /; exit(2) if /^[?]/' | |
| case "$?" in | |
| # handle all the normal cases | |
| ... | |
| # but also add a case for exit due to SIGINT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # PS1 magic | |
| # | |
| # Mostly copied from YUVAL KOGMAN version, added my own __git_ps1 stuff | |
| # Original: http://gist.github.com/621452 | |
| # | |
| # See video demo of this at http://vimeo.com/15789794 | |
| # | |
| # To enable save as .bash_prompt in $HOME and add to .bashrc: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| _set_prompt () { | |
| local exit=$? | |
| #local black="30"; | |
| #local grey="31"; | |
| local red="31"; | |
| local green="32"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # <file system> <mount point> <type> <options> <dump> <pass> | |
| some_dir /home/nothingmuch/some_dir vboxsf uid=nothingmuch,gid=nothingmuch 0 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| VM="$( basename "$0" )" | |
| if [ -n "$1" ]; then | |
| # explicit control of the VM, e.g. `blah stop` | |
| # useful commands are 'pause', 'resume', 'stop', etc | |
| case "$1" in | |
| status) VBoxManage showvminfo "$VM" | grep -i state ;; | |
| *) VBoxManage controlvm "$VM" ${1/stop/acpipowerbutton} ;; # much easier to type |