This file contains hidden or 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
locals { | |
container_definitions = jsonencode([ | |
{ | |
name = var.name, | |
image = var.image, | |
cpu = var.cpu, | |
memory = var.memory, | |
portMappings = [ | |
{ | |
containerPort = var.port, |
This file contains hidden or 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
use std::fs::File; | |
use std::io::{BufRead, BufReader}; | |
let f = File::open("/run/user/1000/bspwm_fifo.paahBQ").unwrap(); | |
let mut b = String::new(); | |
let mut reader = BufReader::new(f); | |
loop { | |
let data = reader.read_line(&mut b).unwrap(); | |
if data != 0 { |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"log" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"time" |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
"time" | |
"golang.org/x/net/context" |
This file contains hidden or 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/signal" | |
"sync/atomic" |
This file contains hidden or 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
def branchApi = new URL("https://api.github.com/repos/:org/:branch/branches") | |
def connection = branchApi.openConnection() | |
connection.setRequestProperty("Authorization", "token ******") | |
if (connection.responseCode == 200) { | |
def branches = new groovy.json.JsonSlurper().parseText(connection.content.text) | |
for (branch in branches) { | |
println(branch.name) | |
} | |
} |
This file contains hidden or 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 javax.net.ssl.SSLSocket; | |
import javax.net.ssl.SSLSocketFactory; | |
import java.io.*; | |
/** Establish a SSL connection to a host and port, writes a byte and | |
* prints the response. See | |
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
*/ | |
public class SSLPoke { | |
public static void main(String[] args) { |
This file contains hidden or 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 lukaf on github. | |
* I am lukaf (https://keybase.io/lukaf) on keybase. | |
* I have a public key whose fingerprint is AE6A D974 E804 35F2 6E10 FA1D BDE4 D237 82B9 09A9 | |
To claim this, I am signing this object: |
This file contains hidden or 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
func CompressDir(directory string, filename string) error { | |
output, err := os.Create(filename) | |
if err != nil { | |
log.Printf("Unable to create destination file %s\n", filename, err) | |
return err | |
} | |
defer output.Close() | |
archive := zip.NewWriter(output) | |
defer archive.Close() |
This file contains hidden or 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 __future__ import print_function | |
class Types(object): | |
def __init__(self, *args): | |
self.dargs = args | |
def __call__(self, fun): | |
self.fun = fun |
NewerOlder