Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
var flattenObject = function(ob) { | |
var toReturn = {}; | |
for (var i in ob) { | |
if (!ob.hasOwnProperty(i)) continue; | |
if ((typeof ob[i]) == 'object') { | |
var flatObject = flattenObject(ob[i]); | |
for (var x in flatObject) { | |
if (!flatObject.hasOwnProperty(x)) continue; |
#!/usr/bin/env sh | |
version() { | |
ruby <<"EOS" | |
doc = File.read './package.json' | |
regex = /("version"\s*:\s*")([^"]+)(")/ | |
cur = regex.match(doc) | |
if ENV['CMD'] == 'major' then | |
nxt = (cur[2].to_i + 1).to_s + ".0.0" | |
elsif ENV['CMD'] == 'minor' then |
#!/usr/bin/env ruby | |
# hubic.rb Get credentials to Webdav server of Hubic account | |
require 'httpclient' | |
require 'json' | |
require 'optparse' | |
require 'highline/import' | |
module Hubic | |
extend self | |
/* https://github.com/nikos/cmskern/blob/master/playapp/public/javascripts/widgets.js*/ | |
/** | |
* Widget for displaying a complete form as specified by the given schema. | |
*/ | |
angular.widget('my:form', function(element) { | |
this.descend(true); // compiler will process children elements | |
this.directives(true); // compiler will process directives |
# Step 1: Set priveleges | |
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all | |
Starting... | |
Setting allow all users to YES. | |
Setting all users privileges to 1073742079. | |
Done. | |
# Step 2: Allow VNC clients |
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation template to deploy jenkins/nginx.", | |
"Parameters" : { | |
"KeyName" : { | |
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances", | |
"Type" : "String", |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# | |
# Acts as a nginx HTTPS proxy server | |
# enabling CORS only to domains matched by regex | |
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/ | |
# | |
# Based on: | |
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html | |
# * http://enable-cors.org/server_nginx.html | |
# | |
server { |
// Copyright (c) 2017 Ismael Celis | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all |
svg text { | |
-webkit-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} | |
svg text::selection { | |
background: none; | |
} |