Skip to content

Instantly share code, notes, and snippets.

@yann2192
yann2192 / pg_change_db_owner.sh
Created September 1, 2016 12:36 — forked from jirutka/pg_change_db_owner.sh
Some convenient scripts to manage ownerships and privileges in PostgreSQL.
#!/bin/bash
#
# The MIT License
#
# Copyright 2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Modify by linuz.ly
package main
import (
"bytes"
"fmt"
"code.google.com/p/go.crypto/ssh"
@yann2192
yann2192 / long_polling.go
Created November 2, 2012 16:01 — forked from border/long_polling.go
long polling for golang
package main
import (
"container/list"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
@yann2192
yann2192 / redcon.go
Created October 31, 2012 16:21 — forked from elazarl/redcon.go
redirect network stream
package main
import (
"log"
"io"
"os"
"crypto/tls"
"strings"
"net"
"flag"
@yann2192
yann2192 / fabfile.py
Created October 24, 2012 14:19 — forked from justinvoss/fabfile.py
Example Fabric and Cuisine Scrips
from deployment.cuisine import *
from fabric.api import *
from fabric.context_managers import *
from fabric.utils import puts
from fabric.colors import red, green
import simplejson
import os
@yann2192
yann2192 / geventreactor.py
Created August 19, 2012 12:50 — forked from juanriaza/geventreactor.py
Twisted reactor running on gevent (libevent+greenlet)
## Copyright (C) 2011 by Jiang Yio <http://inportb.com/>
## Please find instructions at <http://wiki.inportb.com/python:geventreactor>
## The latest code is available at <https://gist.github.com/848058>
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without limitation the rights
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
## copies of the Software, and to permit persons to whom the Software is
## furnished to do so, subject to the following conditions: