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
config.vm.provision :puppet do |puppet| | |
puppet.manifests_path = "manifests" | |
puppet.manifest_file = "site.pp" | |
puppet.modules_path = "modules" | |
end | |
. | |
├── manifests | |
│ └── site.pp | |
├── modules |
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
import Data.Char (ord, toLower, intToDigit) | |
import Data.Function (on) | |
import Data.List | |
import System.Environment (getArgs) | |
key char = case c of | |
c | c >= 'a' && c < 'p' -> 2 + (ord(c) - a) `div` 3 | |
c | c >= 'p' && c <= 's' -> 7 | |
c | c >= 't' && c <= 'v' -> 8 | |
c | c >= 'w' && c <= 'z' -> 9 |
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
<plugin> | |
<groupId>org.codehaus.groovy.maven</groupId> | |
<artifactId>gmaven-plugin</artifactId> | |
<version>1.0</version> | |
<configuration> | |
<source> | |
// Write the compile/runtime classpath to a file, with one entry per line. | |
// Each line contains the relative path to a jar from the root of a Maven | |
// repository. | |
layout = new org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout() |
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
<job> | |
<id>review</id> | |
<parent>base</parent> | |
<abstract>true</abstract> | |
<process>{{ | |
node.scm.buildChooser[0].attributes().class = | |
'com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser' | |
def name = node.scm.userRemoteConfigs[0].children()[0].url.text() | |
name = name.substring(name.lastIndexOf('/') + 1, name.lastIndexOf('.')) | |
def c = new NodeBuilder(). |
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
import java.util.Map.Entry; | |
import java.util.TreeMap; | |
// See http://stackoverflow.com/a/13400317/611182 | |
public class Main { | |
private static TreeMap<Double, String> m = new TreeMap<Double, String>(); | |
static { | |
m.put(1.0, "A"); | |
m.put(2.9, null); |
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
auto lo | |
iface lo inet loopback | |
iface eth0 inet manual | |
auto br0 | |
iface br0 inet dhcp | |
bridge_ports eth0 | |
auto macvlan0 |
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 | |
# Output PID of process listening on given port | |
pid_of_port() { | |
netstat -ntpl 2>/dev/null | \ | |
PORT=$1 awk 'substr($4, match($4, "[0-9]*$")) == ENVIRON["PORT"] { | |
print substr($7, 0, match($7, "/") - 1)}' | |
} | |
success() { |
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
### Keybase proof | |
I hereby claim: | |
* I am martiell on github. | |
* I am martiell (https://keybase.io/martiell) on keybase. | |
* I have a public key whose fingerprint is 8C0A 0901 744D 269A D508 3E28 F56F AB41 85E1 CE7F | |
To claim this, I am signing this object: |
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 | |
$file = urldecode($_GET['F']); | |
$boom = explode("/", $file); | |
$count = count($boom); | |
$file_name = $boom[$count - 1]; | |
header("Content-disposition: attachment; filename=".$file_name); | |
header("Content-type: application/pdf"); | |
readfile($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
import com.fasterxml.jackson.core.JsonGenerator; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.core.JsonToken; | |
import com.fasterxml.jackson.databind.DeserializationContext; | |
import com.fasterxml.jackson.databind.JsonDeserializer; | |
import com.fasterxml.jackson.databind.JsonSerializer; | |
import com.fasterxml.jackson.databind.SerializerProvider; | |
import java.io.IOException; | |
import java.util.ArrayList; |
OlderNewer