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
$ cd /var/run/secrets/kubernetes.io/serviceaccount/ | |
$ curl --cacert ca.crt -H "Authorization: Bearer `cat token`" https://kubernetes.default/api/v1/pods?watch=1 |
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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font"> | |
<edit name="dpi" mode="assign"> <double>75</double> </edit> | |
<edit name="pixelsize" mode="assign"> <double>12.5</double> </edit> | |
<edit name="hintstyle" mode="assign"> <const>vrgb</const> </edit> | |
<edit name="hinting" mode="assign"> <bool>true</bool> </edit> | |
<edit name="autohint" mode="assign"> <bool>false</bool> </edit> | |
<edit name="lcdfilter" mode="assign"> <const>lcddefault</const> </edit> |
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
# 1 "<built-in>" | |
# 1 "foo.c" | |
int do_request(long i) { | |
char buf[100]; | |
int j; | |
for(j = 0; j < i; j++) { | |
buf[j] = 1; | |
} | |
return buf[j-1]; |
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
macro_rules! try { | |
( $expr : expr) => { | |
match $expr { | |
Ok(v) => v, | |
Err(e) => panic!("Err {}: {:?}", stringify!($expr), e), | |
} | |
} | |
} |
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/env ruby | |
URL = ARGV.first || raise("Missing video URL") | |
audio = IO.popen(["youtube-dl", "-f", "bestaudio", "-g", URL]) | |
video = IO.popen(["youtube-dl", "-f", "bestvideo", "-g", URL]) | |
title = IO.popen(["youtube-dl", "-e", URL]) | |
audio_url = audio.read.chomp | |
video_url = video.read.chomp |
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
trait Separator { | |
fn is_sep(&self, c: char) -> bool; | |
} | |
struct ClosureSeparator<F: Fn(char) -> bool>(F); | |
impl<F> Separator for ClosureSeparator<F> where F: Fn(char) -> bool { | |
#[inline] | |
fn is_sep(&self, c: char) -> bool { |
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/ruby | |
require "json" | |
team = nil | |
token = nil | |
if ARGV.size != 1 or ARGV[0] =~ /^-/ | |
STDERR.puts "Usage #$0 'raw text'" | |
exit 1 |
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 node:4.2 | |
RUN npm install --global azure-cli |
Launch Neo4j shell commands through the HTTP REST interface.
You have to set the environment variable GRAPHENEDB_URL
with the URL of your Neo4j database. For example:
$ export GRAPHENEDB_URL="http://MyUser:[email protected]:12345"
Now, you can launch commands: