-
Quick role based authentication: http://arthur.gonigberg.com/2013/06/29/angularjs-role-based-auth/
-
How to do Authorization and Role based permissions in AngularJs: http://nadeemkhedr.wordpress.com/2013/11/25/how-to-do-authorization-and-role-based-permissions-in-angularjs/
-
Handling Oauth2 with Node.js and Angular.js – Passport to the rescue!: http://www.flashics.com/2013/11/24/handling-oauth2-with-node-js-and-angular-js-passport-to-the-rescue/
-
Easy Node authentication setup and local: http://scotch.io/tutorials/javascript/easy-node-authentication-setup-and-local
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import Image | |
from math import sqrt | |
import sys | |
def creaImg(entrada, salida): | |
with open(entrada, 'r') as f: | |
datos = f.read() | |
bytes_datos = bytearray(datos) | |
pixeles = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <netdb.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#define CANARY "in_the_coal_mine" | |
struct { | |
char buffer[1024]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2014 ko-zu <causeless@gmail.com> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This particular code works with html that looks like this: | |
<div class="upload_container" id="photo_number_1"> | |
<div><input name="upload" class="photo_upload_field" type="file" /></div> | |
<div><input type="button" class="upload_photo_submit" value="Upload Photo"></div> | |
<p class="center loading hidden"><img src="/assets/loading.gif"></p> | |
<script> | |
// yes, I know, don't actually put this in a script tag here. It's for illustration purposes only | |
$('.upload_photo_submit')[0]).click(function(event){ajaxFileUpload(event);}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following solution is used to enable GCLB with 1.0.x istio-on-gke add on. | |
# | |
# Ingress gateway in gke-add-on cannot be modified because it is reconciled. | |
# | |
# 1. Create a new ilgateway deployment with `--statusPort 15020`. | |
# 2. Create a new service of type 'NodePort` to point to the above deployment | |
# 3. In the target namespace, create a `gateway` resource to point to the ilbgateway by using | |
# `selector: { "istio": "ilgateway" } | |
# 4. Point k8s (GCLB) ingress resource to ilgateway | |
# 5. Add advanced health-check for GCLB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Twit = require("twit"); | |
var config = require('./oauthconfig'); | |
console.log("config:"); | |
console.log(config); | |
var T = new Twit({ | |
consumer_key: config.consumer_key, | |
consumer_secret: config.consumer_secret, | |
access_token: config.access_token, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://lunanode.com/ | |
/* | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urlparse | |
import argparse | |
import redis | |
import sys | |
from multiprocessing import Pool | |
import signal | |
def parse_redis_url(s): | |
url = urlparse.urlparse(s) | |
if not url.scheme: |
OlderNewer