Skip to content

Instantly share code, notes, and snippets.

View zhyon404's full-sized avatar
👓
Ex...

zhyon404

👓
Ex...
View GitHub Profile
@naholyr
naholyr / _service.md
Created December 13, 2012 09:39
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@brianmed
brianmed / update.txt
Created November 7, 2014 09:09
Auto update timestamp in postgres
[bpm@dev000] c:/opt>cat sql
BEGIN;
CREATE OR REPLACE FUNCTION update_timestamp()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated = now();
RETURN NEW;
END;
$$ language 'plpgsql';
COMMIT;
@xcsrz
xcsrz / server.go
Created January 2, 2016 07:12
A golang web server on a randomly (os) chosen port.
package main
import (
"fmt"
"github.com/skratchdot/open-golang/open"
"net"
"net/http"
)
func main() {
@shautzin
shautzin / AES.go
Created March 24, 2017 01:59
AES/CBC/PKCS5Padding implementation by Golang
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"fmt"
)
func main() {