Skip to content

Instantly share code, notes, and snippets.

View sekmet's full-sized avatar
📡
If you are going to TRY, go ALL the WAY!

Carlos Guimaraes sekmet

📡
If you are going to TRY, go ALL the WAY!
View GitHub Profile
@sekmet
sekmet / ipfs.yml
Last active August 19, 2018 19:24 — forked from kordless/ipfs.yml
Deploy IPFS on Kubernetes
apiVersion: v1
kind: Service
metadata:
name: ipfs
spec:
type: NodePort
ports:
- name: ipfs
port: 8080
targetPort: 8080
@sekmet
sekmet / cloud-config.yaml
Created July 30, 2018 04:07 — forked from ruo91/cloud-config.yaml
Rancher OS - example: cloud-config.yaml
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1TjQnNq/HMlI4JCCakK2SQwclw2T+HzuAo3p1+HSj7LsDTJEaMzvaQ3OmeXt6ZHycmv9Cx3sBDhGCu02891C2PKahNTplIi0dC0kFZcfu4J6ZynZLmaGPG81oBpZddEknazawWKq5Xdx20He+qoN86zGbrcXQKKZ30haZmzu/n/315Kazhyy7Iuaf1EvrSEbW97LBNtxAaEtolbPMPFjdjwD4LjARpeP7JNuAe4EQElfBElXdvQJxd4bcchavvNa68Y3IKGZ2kyKGBcZDLOICpGaZBOLYLhuwLn+zO3Hh3xYSGyXQQqUJVx4hRGIolm41F1vQMUS9Zxx/PMleqvWD
rancher:
network:
interfaces:
eth*:
dhcp: true
dns:
@sekmet
sekmet / tutorial.md
Created July 17, 2018 14:15 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@sekmet
sekmet / corsdevserver.py
Created July 5, 2018 19:17 — forked from igniteflow/corsdevserver.py
A simple CORS compliant web server in Python, useful for development (with @alex-moon)
import BaseHTTPServer
import cgi
from pprint import pformat
PORT = 6969
FILE_TO_SERVE = 'path/to/your/response/content.json'
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""
@sekmet
sekmet / server.py
Created July 5, 2018 19:17 — forked from razor-x/server.py
Python http.server that sets Access-Control-Allow-Origin header.
# Python http.server that sets Access-Control-Allow-Origin header.
# https://gist.github.com/razor-x/9542707
import os
import sys
import http.server
import socketserver
PORT = 8000
@sekmet
sekmet / gist:64da6ddf2c1d7efad31ff4685083fd7a
Created March 24, 2018 01:13 — forked from pusherman/gist:3145761
HTML - Select list of US states
<select name="state" id="state">
<option value="" selected="selected">Select a State</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
@sekmet
sekmet / qemu_osx_rpi_raspbian_jessie.sh
Created January 24, 2018 16:43 — forked from hfreire/qemu_osx_rpi_raspbian_jessie.sh
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@sekmet
sekmet / walksync.js
Created March 16, 2017 20:06 — forked from kethinov/walksync.js
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {
@sekmet
sekmet / save_tagged_photos.php
Created December 1, 2016 12:26 — forked from matthewpizza/save_tagged_photos.php
Download all the photos on Instagram for a tag. Probably hit API limits for popular tags
<?php
/**
* Get All Photos for a Tag on Instagram
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
$everything = array();
$access_token = 'need access token for Instagram API';
# Note: if you want to run multiple meteor apps on the same server,
# make sure to define a separate port for each.
# Upstreams
upstream gentlenode {
server 127.0.0.1:58080;
}
# HTTP Server
server {