This file contains hidden or 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 -*- | |
| # <bitbar.title>Kubeconfig Context Changer</bitbar.title> | |
| # <bitbar.version>v1.0</bitbar.version> | |
| # <bitbar.author>Chris Opland</bitbar.author> | |
| # <bitbar.author.github>copland</bitbar.author.github> | |
| # <bitbar.desc>Displays active kubeconfig context and allows you to easily change contexts.</bitbar.desc> | |
| # <bitbar.dependencies>python,kubectl</bitbar.dependencies> |
This file contains hidden or 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
| Place in .profile | |
| ViewMemory() { | |
| vm_stat | perl -ne '/page size of (\d+)/ and $size=$1; /Pages\s+([^:]+)[^\d]+(\d+)/ and printf("%-16s % 16.2f Mi\n", "$1:", $2 * $size / 1048576);' | |
| } | |
| alias free=ViewMemory |
This file contains hidden or 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 Html exposing (..) | |
| import Html.App exposing (beginnerProgram, program) | |
| import Html.Events exposing (onClick) | |
| import Task | |
| import Debug | |
| type alias Model = Int | |
| type Msg |
This file contains hidden or 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 Html exposing (..) | |
| import Html.Attributes exposing (style) | |
| import Html.Events exposing (onClick) | |
| import Html.App | |
| type alias Model = Int | |
| type Msg = Increment | Decrement | |
| update : Msg -> Model -> Model |
This file contains hidden or 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
| # Switch prefix from C-b to C-b | |
| set -g prefix C-a | |
| unbind C-b | |
| # Update delay time to be very short | |
| set -s escape-time 1 | |
| # Set the base-index to 1 instead of 0, so we can use prefix 1 to get to the first window | |
| set -g base-index 1 | |
| setw -g pane-base-index 1 |
This file contains hidden or 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
| /*---------------------------------- | |
| * Kefir.Bus | |
| */ | |
| var Bus = function() { | |
| Kefir.Pool.call(this); | |
| } | |
| Bus.prototype = Object.create(Kefir.Pool.prototype); | |
| Bus.prototype.constructor = Bus; | |
| Bus.prototype.push = function(x) { |
This file contains hidden or 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 Bacon = require("./vendor/Bacon.min.js"); | |
| var GameObject = function() { | |
| this.bus = new Bacon.Bus(); | |
| this.eventStreams = []; | |
| this.eventHandlers = []; | |
| this.data = {}; | |
| } | |
| GameObject.prototype.registerEventType = function(eventType) { |
This file contains hidden or 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
| <link rel="import" href="../ace-element/ace-element.html"> | |
| <link rel="import" href="../google-map/google-map.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; | |
| width: 100%; |
This file contains hidden or 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
| (ns dungeonverse.core | |
| (:use noir.core) | |
| (:require [noir.server :as server])) | |
| (def the-server (atom nil)) | |
| (defpage "/welcome" [] | |
| "Welcome to Noir!") | |
| (defn start [] (reset! the-server (server/start 8080 [:base-url "stf.gameoire.com"]))) |
This file contains hidden or 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
| -module(monad). | |
| -export([ monad_context/2, putst/1, getst/0, lift/0, return/1 ]). | |
| -export([ test/0 ]). | |
| %%%%%%%%%%%%%%%%%%%%% Erlang Monad %%%%%%%%%%%%%%%%%%%%%% | |
| %% Working on a simple monad implementation for Erlang %% | |
| %% %% | |
| %% Just for fun I tried whipping up a simple erlang %% | |
| %% monad. It uses the process dictionary and I haven't %% | |
| %% implemented lift and many children of a monad state %% |
NewerOlder