Skip to content

Instantly share code, notes, and snippets.

View gullitmiranda's full-sized avatar
🌎
Working from anywhere

Gullit Miranda gullitmiranda

🌎
Working from anywhere
View GitHub Profile
@nuxlli
nuxlli / azure_upload_async.js
Last active August 13, 2019 10:52
Example uploaded file to azure with Q and without Q
var blob = require('azure').createBlobService()
, fs = require('fs')
, Q = require('q');
var options = { publicAccessLevel: 'blob' };
// With Q
var fsLstat = Q.nbind(fs.lstat, fs);
var getContainer = Q.nbind(blob.createContainerIfNotExists, blob);
var streamFile = Q.nbind(blob.createBlockBlobFromStream, blob);
@WesleyRibs
WesleyRibs / Azkfile.js
Created September 13, 2014 00:50
Azkfile example for php applications
/**
* Documentation: http://docs.azk.io/Azkfile.js
*/
// Adds the systems that shape your system
systems({
proprietario: {
// Dependent systems
depends: ["mysql"],
provision: [
@nkbt
nkbt / .eslintrc.js
Last active May 1, 2024 21:15
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@haggen
haggen / README.md
Last active September 11, 2018 03:19
boot2docker on nfs

Get boot2docker working with nfs instead of vboxsf.

Tested on:

- Boot2Docker-cli version: v1.6.0
  Git commit: 9894ae9
- Boot2Docker-cli version: v1.6.2
  Git commit: cb2c3bc
@fearenales
fearenales / azkfile-counter.sh
Last active June 28, 2016 16:15
How many Azkfile.js in non Azuki's team repo exist?
#! /bin/bash
curl -s "https://github.com/search?utf8=%E2%9C%93&q=Azkfile.js+in%3Apath+-user%3Aazukiapp+-user%3Arun-project+-user%3Amarcusgadbem+-user%3Aheitortsergent+-user%3Asaitodisse+-user%3Agullitmiranda+-user%3Afearenales+-user%3Anuxlli&type=Code&ref=searchresults" | grep counter | sed s/.*counter\"\>//g | sed s/\<\\/.*//g
@edorgeville
edorgeville / release.sh
Last active May 1, 2019 20:14
Creates a signed and zipaligned APK from your Ionic project
#!/bin/bash
#
# Creates a signed and zipaligned APK from your Ionic project
#
# Place your keystore in the root of your project and name it <company>.keystore
# Use this script as following :
# $ ./release.sh [company] [version]
#
# Don't forget to gitignore your key and your compiled apks.
#
@gullitmiranda
gullitmiranda / docker_cheat_sheet.md
Last active May 11, 2016 02:35
Clean Docker images and containers cheat sheet.

Docker Cheat Sheet

NOTE: if you are using the docker without the http://azk.io installed, use docker instead of adocker.

Kill running containers

adocker kill $(adocker ps -q | tr '\r\n' ' ')
defmodule Morgue.Repo do
use Ecto.Repo, otp_app: :my_awesome_app
def log(entry) do
result = super(entry)
time = (entry.query_time + entry.queue_time) / 1_000
:ok = :exometer.update ~w(tracker ecto query_exec_time)a, time
:ok = :exometer.update ~w(tracker ecto query_count)a, 1
result
end
@chrismccord
chrismccord / phoenix-0.15-upgrade.md
Last active August 29, 2015 14:25
Phoenix upgrade instructions 0.14.x to 0.15.0

Sockets and Channels

A new socket behaviour has been introduced to handle socket authentication in a single place, wire up default channel assigns, and disconnect a user's multiplex connection as needed.

First things first, create a UserSocket module in web/channels/user_socket.ex and move all your channel routes from web/route.ex to the user socket: (replace MyApp with your application module)

0.14.x - web/router.ex:

defmodule MyApp.Router do
   ...
@nuxlli
nuxlli / Azkfile.js
Created November 3, 2015 20:37
"bins" example in Azkfile
aliases({
bundle : { command: ["bundle", "exec"]}, // system: azkdemo (default)
scaffold : { alias: "bundle", append: ["rails", "g", "scaffold"]},
test : { alias: "bundle", append: ["rake", "test"], tty: true, context: 'test'},
'import-db': { system: "mysql", command: ["mysql"], depends: false}
});
// azk script generator --path ./script
// ./script/bundle
// ./script/scaffold