View ElasticSearch.sh
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
#!/bin/bash | |
### USAGE | |
### | |
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
View maven-333.sh
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
#!/bin/sh | |
sudo apt-get purge -y maven | |
if ! [ -e apache-maven-3.3.3-bin.tar.gz ]; then (curl -OL http://mirror.olnevhost.net/pub/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz); fi | |
sudo tar -zxf apache-maven-3.3.3-bin.tar.gz -C /usr/local/ | |
sudo ln -s /usr/local/apache-maven-3.3.3/bin/mvn /usr/bin/mvn | |
echo "Maven is on version `mvn -v`" |
View chart.cljs
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
(ns om-data-vis.chart | |
(:require-macros [cljs.core.async.macros :refer [go go-loop]]) | |
(:require [om.core :as om :include-macros true] | |
[cljs.core.async :refer [<! chan put! sliding-buffer]] | |
[ajax.core :refer (GET)] | |
[sablono.core :as html :refer-macros [html]])) | |
(defn- draw-chart [cursor {:keys [div bounds x-axis y-axis plot]}] | |
(let [{:keys [id width height]} div | |
Chart (.-chart js/dimple) |
View routing.cljs
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
defresource contact [handlers] | |
:allowed-methods #{:delete :put} | |
:available-media-types #{"application/json"} | |
:handle-ok (fn [{{{id :id} :route-params routes :routes} :request}] | |
(assert (realized? handlers)) | |
(html [:div [:h2 "Contact: " id] | |
[:a {:href (path-for routes (:contacts @handlers))} "Index"]]))) | |
(defn make-handlers [database] | |
(let [p (promise)] |
View typeahead.cljs
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
(defn typeahead [data owner] | |
(reify | |
om/IInitState | |
(init-state [_] {:text ""}) | |
om/IRenderState | |
(render-state [_ {:keys [text]}] | |
(let [words (:words data)] | |
(dom/div nil | |
(dom/h2 nil "Tag") | |
(dom/input |
View build.sh
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
babel github-es6.js -o github.js --optional runtime --experimental |
View gist:fd15902864d47696b9d5
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
#!/bin/sh | |
while true; | |
do | |
clear | |
git log \ | |
--graph \ | |
--all \ | |
--color \ | |
--date=short \ | |
-40 \ |
View SampleLoader.php
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 namespace Endata\Data; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\File; | |
use Ingredient; | |
use Nutrient; | |
use Composition; | |
use Settings; | |
use Plant; | |
use Formula; |
View Nutrient.php
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 | |
class Nutrient extends BaseModel { | |
protected $guarded = array(); | |
public static $rules = array( | |
'name' => 'required', | |
'unit' => 'required' | |
); |
View StripeBilling.php
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 namespace Endata\Billing; | |
use Stripe; | |
use Stripe_Charge; | |
use Stripe_Customer; | |
use Stripe_InvalidRequestError; | |
use Stripe_CardError; | |
use Config; | |
use Exception; |
NewerOlder