Skip to content

Instantly share code, notes, and snippets.

View funkytaco's full-sized avatar

Luis Gonzalez funkytaco

View GitHub Profile
@funkytaco
funkytaco / Query-Registry.ps1
Created October 14, 2015 20:36 — forked from so0k/Query-Registry.ps1
Query a docker registry v2/_catalog endpoint from powershell
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1)]
$Filter=".*",
#TODO: handle https & no basic auth as well..
$RegistryEndpoint = "registry.mysite.com",
$UserName = "user",
$Password = "password"
)
@funkytaco
funkytaco / _etc_consul.d_consul.json
Last active October 22, 2015 20:45 — forked from ianunruh/consul.sh
Install Consul on CentOS 7 AMD64
{
"server": true,
"rejoin_after_leave": true,
"enable_syslog": false,
"syslog_facility": "local5",
"data_dir": "/var/consul/data",
"ui_dir": "/var/consul/ui",
"datacenter": "dc1",
"statsd_addr": "<some IP>:8125",
"recursor": "<some IP>"
#!/bin/sh
# Must have boot2docker installed if using Mac OS X
installMachineMac() {
sudo wget --no-check-certificate -O /usr/local/bin/docker-machine http://docker-machine-builds.evanhazlett.com/latest/docker-machine_darwin_amd64
sudo chmod +x /usr/local/bin/docker-machine
}
installDockerBinMac(){
sudo wget --no-check-certificate -O /usr/local/bin/docker https://get.docker.com/builds/Darwin/x86_64/docker-latest
@funkytaco
funkytaco / README.md
Last active August 29, 2015 14:21 — forked from agnoster/README.md

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@funkytaco
funkytaco / README.md
Last active August 29, 2015 14:21 — forked from smileart/README.md

My modified fork of agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

Compatibility

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title>
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script>
<script type="text/javascript" charset="utf-8">
$(function () {
var extractToken = function(hash) {
'use strict';
angular.module('app')
.controller('CreateWorkflowCtrl', function($scope, $location, Workflow, Category) {
$scope.workflow = new Workflow();
$scope.page = 0;
$scope.create = function() {
$scope.workflow.$save(function(data) {
$location.path("/workflow/" + data.id);
http://jsfiddle.net/brendanowen/uXbn6/8/
<script type="text/ng-template" id="tree_item_renderer.html">
{{data.name}}
<button ng-click="add(data)">Add node</button>
<button ng-click="delete(data)" ng-show="data.nodes.length > 0">Delete nodes</button>
<ul>
<li ng-repeat="data in data.nodes" ng-include="'tree_item_renderer.html'"></li>
</ul>
</script>
@funkytaco
funkytaco / angularjs-interceptor.js
Last active August 29, 2015 14:13 — forked from gnomeontherun/angularjs-interceptor.js
Intercept XHR/Ajax requests with AngularJS http interceptors. This allows you to globally intercept and modify requests and responses. You don't need to declare all of the methods, just the ones you need. Some example uses would be logging errors, adding extra headers, or triggering 'loading' screens. This intercepts ALL requests/responses, so y…
// Intercepting HTTP calls with AngularJS.
angular.module('MyApp', [])
.config(function ($provide, $httpProvider) {
// Intercept http calls.
$provide.factory('MyHttpInterceptor', function ($q) {
return {
// On request success
request: function (config) {
// console.log(config); // Contains the data about the request before it is sent.