Skip to content

Instantly share code, notes, and snippets.

View NSLog0's full-sized avatar
🦋

NSLog0 NSLog0

🦋
View GitHub Profile
@NSLog0
NSLog0 / 01_nginx.config
Created March 27, 2019 07:44 — forked from luisacarrion/01_nginx.config
AWS Elastic Beanstalk .ebextensions - custom location block
files:
"/etc/nginx/conf.d/01_proxy.conf":
mode: "000644"
owner: root
group: root
content: |
client_max_body_size 10M;
"/etc/nginx/conf.d/02_app_server.conf":
mode: "000644"
@NSLog0
NSLog0 / ATECC508A.md
Created September 16, 2018 07:25 — forked from bsodmike/ATECC508A.md
IoT Security with the Atmel ATECC508A

IoT Security with the Atmel ATECC508A

Get Public ECC Key
Key Number [0-15]
Public Key 15
PubKey:26712508A3544575F38526FA3D6AAAF920728A3ABDF2421841243F1961222944AF116DDFB4AF797EA70FCD09C9FEBC490793C271165410FAF3672BE5FD8D1B5D

Hash Data
Enter Message to hash: Thing Innovations Crypto
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@NSLog0
NSLog0 / ctags.setup
Created March 13, 2018 10:10 — forked from nazgob/ctags.setup
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
@NSLog0
NSLog0 / registrations_controller.rb
Created July 19, 2017 16:03 — forked from jwo/registrations_controller.rb
API JSON authentication with Devise
class Api::RegistrationsController < Api::BaseController
respond_to :json
def create
user = User.new(params[:user])
if user.save
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201
return
else
@NSLog0
NSLog0 / app.js
Created March 24, 2016 17:21 — forked from clarle/app.js
Short tutorial on how to use Express and node-mysql
// Module dependencies
var express = require('express'),
mysql = require('mysql');
// Application initialization
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',