Skip to content

Instantly share code, notes, and snippets.

View 0xRoch's full-sized avatar
💭
I may be slow to respond.

Roch 0xRoch

💭
I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am d-roch on github.
  • I am roch (https://keybase.io/roch) on keybase.
  • I have a public key ASD-TNkypXOt_KFTiqNoPHuuKMNNf1HIkkVgPgORdpP8MAo

To claim this, I am signing this object:

@0xRoch
0xRoch / .travis.yml
Created September 27, 2013 14:39 — forked from letmaik/.travis.yml
language: java
env:
global:
- SONATYPE_USERNAME=yourusername
- secure: "your encrypted SONATYPE_PASSWORD=pass"
after_success:
- python addServer.py
- mvn clean deploy --settings ~/.m2/mySettings.xml
@0xRoch
0xRoch / gist:5728389
Created June 7, 2013 10:24
Playframework - Scala GIF Pixel
import org.apache.commons.codec.binary.Base64
def pixel = Action {
val source: String = "R0lGODlhAQABAJAAAP8AAAAAACH5BAUQAAAALAAAAAABAAEAAAICBAEAOw==";
val byteArray = Base64.decodeBase64(source.getBytes())
Ok(byteArray).as("image/gif")
}
var list = fetchList
while (list.size < limit) {
list = list ::: fetchList
}
array (
0 =>
array (
'categorisation_prio.selection.Sélection Vintage' =>
array (
'order' => 'asc',
'missing' => '_last',
'ignore_unmapped' => true,
),
),
UPDATE table set field = replace(field, 'original', 'new');
class MySnippet() {
def render = {
"meta" #> ("property=og:type [content]" #> "sampleType" &
"property=og:title [content]" #> "sampleTitle" &
"property=og:image [content]" #> "sampleImg" &
"property=og:url [content]" #> "sampleUrl")
}
<lift:surround with="default" at="body">
<div class="lift:MySnippet">
<head_merge>
<meta property="og:type" content="" />
<meta property="og:title" content="" />
<meta property="og:image" content="" />
<meta property="og:description" content="" />
<meta property="og:url" content="">
</head_merge>
</div>
<?php
function sendMemcacheCommand($command){
$server = "localhost";
$port = 11211;
$s = @fsockopen($server,$port);
if (!$s){
die("Cant connect to:".$server.':'.$port);
def renderList = {
".GsImageBox *" #> page.map(outfit => {
".outfit-thumb [href]" #> outfit.url() &
".thumb [alt]" #> outfit.toString() &
".thumb [src]" #> outfit.thumbUrl() &
".views-count *" #> outfit.view
})
}