Skip to content

Instantly share code, notes, and snippets.

@tuzzeg
tuzzeg / AddressHelper.php
Created Sep 6, 2017 — forked from Jonathonbyrd/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.
View AddressHelper.php
<?php
/**
* @author Jonathon Byrd
* @package Address Parsing
*
*
*/
class AddressHelper extends ObjectBase
{
/**
@tuzzeg
tuzzeg / FindUrls.java
Created Aug 2, 2016
Using LinkedIn URL detector
View FindUrls.java
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;
View kubernetes-compose.yml
# 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
View gist:7ec508db4308477d080e
int main() {
int i = 100;
// while i slides down to 0
while ( i --\
\
\
> 0 ) {
printf("test");
}
}
View julia_types.jl
# 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))"
You can’t perform that action at this time.