Skip to content

Instantly share code, notes, and snippets.

@tuzzeg
tuzzeg / list.md
Created July 18, 2022 05:46 — forked from ih2502mk/list.md
Quantopian Lectures Saved
@tuzzeg
tuzzeg / AddressHelper.php
Created September 6, 2017 18:21 — forked from jonathonbyrdziak/AddressHelper.php
Parse Address :: This function is designed to parse a complete street address using PHP. If it can't figure out the parsing itself, then it sends the address to google to have google parse the street address.
<?php
/**
* @author Jonathon Byrd
* @package Address Parsing
*
*
*/
class AddressHelper extends ObjectBase
{
/**
@tuzzeg
tuzzeg / FindUrls.java
Created August 2, 2016 05:27
Using LinkedIn URL detector
import com.linkedin.urls.Url;
import com.linkedin.urls.detection.UrlDetector;
import com.linkedin.urls.detection.UrlDetectorOptions;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Scanner;
# docker run --net=host -d gcr.io/google_containers/etcd:2.0.9 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
etcd:
image: gcr.io/google_containers/etcd:2.0.9
net: host
command: ['/usr/local/bin/etcd', '--addr=127.0.0.1:4001', '--bind-addr=0.0.0.0:4001', '--data-dir=/var/etcd/data']
# docker run --net=host -d -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v0.21.2 /hyperkube kubelet --api_servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=127.0.0.1 --config=/etc/kubernetes/manifests
kubelet:
image: gcr.io/google_containers/hyperkube:v0.21.2
net: host
@tuzzeg
tuzzeg / gist:7ec508db4308477d080e
Created May 27, 2015 05:14
slide to operator
int main() {
int i = 100;
// while i slides down to 0
while ( i --\
\
\
> 0 ) {
printf("test");
}
}
@tuzzeg
tuzzeg / julia_types.jl
Created May 9, 2014 21:29
Julia types
# Define holder for Int, parametrized with number.
type I{N}
x::Int
end
# We have access to type parameter in runtime.
show{N}(x::I{N}) = "N(x=$(x.x) N=$N)"
# We can specialize implementation by type parameter.
show(x::I{1}) = "1(x=$(x.x))"