This file contains 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
#!/usr/bin/python | |
""" | |
Suspend all running vagrant machines, based on what is found in | |
user's ~/.vagrant.d files | |
Usage: | |
vagrant_suspend_all | |
""" | |
from json import load as loadJSON | |
import sys |
This file contains 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/sh | |
echo "$(tput setaf 3)--- Kernel 3.13 will be installed in an `uname -i` system---$(tput sgr0)" | |
echo "" | |
sleep 2 | |
read -p "Press Enter to continue, or abort by pressing CTRL+C" nothing |
This file contains 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
# Please fork/edit and add to this list # | |
I'm trying to maintain a database of linux dotfiles created in the home directory, and which packages create/use these files. | |
Many of these are self-explanatory (i.e. named after package), but I'll list all I can for potential programmatic use. | |
Here are some I know about (more to come): | |
## Format: dotfile <tab> package[,package,...] <tab> description | |
``` | |
.bash_history bash |
This file contains 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
# Command line volume control # | |
In order to control the master volume in linux via the command line, you can use amixer (assuming this is available in your distribution). | |
## Example: ## | |
Increase master volume by 5 units | |
amixer set Master "5+" |
This file contains 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 iq's latest live coding video, "a simple eye ball" | |
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform vec2 resolution; | |
uniform vec2 mouse; | |
uniform float time; |
This file contains 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
<?php | |
/** | |
* Load a YAML fixture file into the Database. | |
* Good for quick dump/restore for testing, or for scaffolding a database. | |
*/ | |
class PermanentFixtureTask extends BuildTask { | |
public function run($request) { | |
$yaml = new YamlFixture($request->requestVar('file')); |
This file contains 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
Property changes on: sapphire/core/model | |
___________________________________________________________________ | |
Added: svn:ignore | |
+ .SiteTree.php.swp | |
Index: sapphire/forms/ComplexTableField.php | |
=================================================================== | |
--- sapphire/forms/ComplexTableField.php (revision 109060) | |
+++ sapphire/forms/ComplexTableField.php (working copy) |
This file contains 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
# Based on code here: http://westhoffswelt.de/blog/0036_xpath_to_select_html_by_class.html | |
$x('//a[@class | |
and ( | |
contains(normalize-space(@class), " q ") | |
or starts-with(normalize-space(@class), "q ") | |
or substring(normalize-space(@class), string-length(normalize-space(@class)) - string-length("q")) = " q" | |
or @class = "q" | |
) |
NewerOlder