Skip to content

Instantly share code, notes, and snippets.

View ocpodariu's full-sized avatar

Ovidiu PODARIU ocpodariu

  • Deepstash
  • Bucharest, Romania
View GitHub Profile
@ocpodariu
ocpodariu / stream_image.go
Created May 16, 2019 12:09
Serve external images from Go
package main
import (
"bytes"
"io/ioutil"
"log"
"net/http"
"time"
)
@ocpodariu
ocpodariu / elasticache-copy.py
Last active June 27, 2019 13:00
Copy Redis database between two Elasticache services
#!/usr/bin/env python
import sys
import logging
import ConfigParser
import redis
def connect_to_redis(host, port, database):
rc = redis.Redis(host=host, port=port, db=database)
rc.get("test-conn")

Keybase proof

I hereby claim:

  • I am ocpodariu on github.
  • I am ovd (https://keybase.io/ovd) on keybase.
  • I have a public key ASAeiz9ahABh0CDMlsZIIvyneA5gs5URquExrwMpwjJrIQo

To claim this, I am signing this object:

@ocpodariu
ocpodariu / flatten.go
Last active September 20, 2017 10:40
Flatten a list of lists and integers
// Given a list that contains integers and lists of integers,
// build a list containing all the integers.
//
// Example:
// given L = [1 2 [7 [8 9]] 3 [4 5] 6]
// obtain M = [1 2 7 8 9 3 4 5 6]
package main
import (