Skip to content

Instantly share code, notes, and snippets.

@chris-ramon
chris-ramon / jessfraz.md
Created August 5, 2018 04:02 — forked from acolyer/jessfraz.md
Containers, operating systems and other fun things from The Morning Paper
@chris-ramon
chris-ramon / aes256-gcm.go
Created July 25, 2016 17:38 — forked from kkirsche/aes256-gcm.go
AES-256 GCM Encryption Example in Golang
package example_test
import (
"crypto/aes"
"crypto/cipher"
"hex"
"io"
)
// AES-GCM should be used because the operation is an authenticated encryption
@chris-ramon
chris-ramon / main.go
Created July 25, 2016 17:38 — forked from manishtpatel/main.go
GoLang Encrypt string to base64 and vice versa using AES encryption.
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"fmt"
"io"
)
@chris-ramon
chris-ramon / reflection.go
Created June 26, 2016 21:46 — forked from drewolson/reflection.go
Golang Reflection Example
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`
@chris-ramon
chris-ramon / py3.py
Last active January 9, 2016 04:12
python 3 / django - notes
# create an venv
python3 -m venv myvenv
# activate it
python3 -m venv myvenv
# initial migrate
python manage.py migrate
# run migrations
python manage.py makemigrations myapp
@chris-ramon
chris-ramon / sketch.sh
Last active January 7, 2016 22:08
sketch notes
# plugin to adjust (alt - arrows) margins
# nudg.it
# clone + guide lines
alt - click
# clone
cmd - d
# grid layout
@chris-ramon
chris-ramon / gql.go
Created January 6, 2016 00:46
graphql go new api
//
package main
import (
"log"
"github.com/graphql-go/graphql"
)
type Schema struct {
@chris-ramon
chris-ramon / dev.txt
Last active December 16, 2015 05:37
chrome dev tools shortcuts
# inspect element
cmd + shift + c
# navigate through tabs
cmd + [
cmd + ]
@chris-ramon
chris-ramon / flux.js
Created June 2, 2015 23:16
flux notes - simple flux implementation.
// simple flux implementation based on facebook/react examples
// 1. Component
class App extends Component {
foo() {
yStoreActions.create(payload);
}
componentDidMount() {
yStore.on(CHANGE_EVENT, this._onChange);
}
@chris-ramon
chris-ramon / gulp_replacer.js
Last active August 29, 2015 14:21
gulp replacer
angular.module('coolapp-constants',[])
.constant('apiUrl', '@@apiUrl');
// gulp-replace-task
//- config/
// ` localdev.json
// ` test.json
// ` production.json