Skip to content

Instantly share code, notes, and snippets.

View msroot's full-sized avatar
:octocat:

Yannis Kolovos msroot

:octocat:
View GitHub Profile
@msroot
msroot / couchdb_delete_non_design_docs.js
Created June 1, 2016 22:34 — forked from ryankirkman/couchdb_delete_non_design_docs.js
Delete all non-design docs in CouchDB (using cradle)
var cradle = require('cradle');
var database = 'app';
cradle.setup({
host: '127.0.0.1',
port: 5984,
auth: { username: "YOUR_USERNAME", password: "YOUR_PASSWORD" }
});

LiveScript Style Guide

This is a style guide for the LiveScript programming language.

Code Layout

Indentation

Use 4 spaces per indentation level, not tabs, not another amount of spaces.

@msroot
msroot / gist:789b6e68211ac3973dcda47ff417709f
Created May 11, 2016 13:21
Monitoring and Management Web Application for ElasticSearch instances and clusters.
1. cd /usr/local/Cellar/elasticsearch/2.0.0_1/bin
2. plugin -install royrusso/elasticsearch-HQ
3. open http://localhost:9200/_plugin/hq/
and connect
Rule of Modularity: Write simple parts connected by clean interfaces.
Rule of Clarity: Clarity is better than cleverness.
Rule of Composition: Design programs to be connected with other programs.
Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
Rule of Simplicity: Design for simplicity; add complexity only where you must.
Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
Rule of Transparency: Design for visibility to make inspection and debugging easier.
Rule of Robustness: Robustness is the child oftransparency and simplicity.
Rule of Representation: Fold knowledge into data, soprogram logic can be stupid and robust.
Rule of Least Surprise: In interface design, always do theleast surprising thing.
2, 2 : 10
2, 2 : 11
2, 2 : 12
2, 0..8 : 13
2, 0..8 : 14
2, 0..8 : 15
2, 0..8 : 16
2, 0..8 : 17
2, 0..8 : 18
3, 0..8 : 19
2, 2 : 10
2, 2 : 11
2, 2 : 12
2, 2 : 13
2, 3 : 14
2, 3 : 15
2, 3 : 16
2, 3 : 17
2, 3 : 18
3, 3 : 19
__ __ __ _______ _______ ___ ___ _______ __ _______ ___________ __ __ ________ __ ___ ___ _______ _______ ______ _______ _______ __ __
/" | | "\ /""\ | __ "\ | __ "\|" \/" | | _ "\ |" \ /" \(" _ ")/" | | "\ |" "\ /""\ |" \/" | /" _ "| /" "| / " \ /" \ /" _ "| |" \ /""\
(: (__) :) / \ (. |__) :)(. |__) :)\ \ / (. |_) :)|| | |: |)__/ \\__/(: (__) :)(. ___ :) / \ \ \ / (: ( \___) (: ______) // ____ \ |: |(: ( \___) || | / \
\/ \/ /' /\ \ |: ____/ |: ____/ \\ \/ |: \/ |: | |_____/ ) \\_ / \/ \/ |: \ ) || /' /\ \ \\ \/ \/ \ \/ | / / ) :)|_____/ ) \/ \ |: | /' /\ \
// __ \\ // __' \ (| / (| / / / (| _ \\ |. | // / |. | // __ \\ (| (___\
require 'time'
def wake_up!
`osascript -e 'tell application "iTunes" to play playlist "Feel Free"'`
`osascript -e "set Volume 10"`
`osascript -e 'tell application "Slack" to activate'`
end
osascript -e 'tell application "iTunes" to play playlist "Feel Free"'
osascript -e "set Volume 10"
osascript -e 'tell application "Slack" to activate'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.kolovos.script</string>
<key>LaunchOnlyOnce</key>
<false/>