Skip to content

Instantly share code, notes, and snippets.

View mbejda's full-sized avatar
🎯
Focusing

Milos Bejda mbejda

🎯
Focusing
View GitHub Profile
@mbejda
mbejda / gist:9353144
Created March 4, 2014 18:56
Simple build file
({
removeCombined: true,
preserveLicenseComments: false,
mainConfigFile: "init.js",
name: "../app/init",
out: "main-built.js",
include: ['../vendors/require.js']
})
<% layout('../../../layout/dashboard.ejs') %>
<div data-bind="page: {id:'campaigns', role:'start',fx: 'slide', sourceOnShow: '/html/influencer/pages/campaigns/campaigns.html',beforeShow:Pages.viewCampaigns}"></div>
<div data-bind="page: {id:'campaign',scrollToTop:true}">
<div data-bind="page: {id:'view', fx: 'slide', sourceOnShow: '/html/influencer/pages/campaigns/campaign.html',beforeShow:Pages.viewCampaign, scrollToTop: true, sourceCache: true}"></div>
</div>
<div data-bind="page: {id:'account', fx: 'slide', sourceOnShow: '/html/influencer/pages/account/account.html',beforeShow:Pages.viewAccount}"></div>
<div data-bind="page: {id:'funds', fx: 'slide', sourceOnShow: '/html/advertiser/pages/funds/funds.html',beforeShow:Pages.viewFunds}"></div>
<select id="control-timezone" name="timezone">
<option value="">Select a time zone:</option>
<optgroup label="Africa">
<option id="tz-Abidjan" value="Africa/Abidjan">Abidjan</option>
<option id="tz-Accra" value="Africa/Accra">Accra</option>
<option id="tz-Addis Ababa" value="Africa/Addis_Ababa">Addis Ababa</option>
<option id="tz-Algiers" value="Africa/Algiers">Algiers</option>
<option id="tz-Asmara" value="Africa/Asmara">Asmara</option>
<option id="tz-Bamako" value="Africa/Bamako">Bamako</option>
<option id="tz-Bangui" value="Africa/Bangui">Bangui</option>
@mbejda
mbejda / gist:02b4511356f1b7a63bef
Created June 10, 2014 18:31
knockout arrayFirst Utility
var match = ko.utils.arrayFirst(myObservableArray(), function(item) {
return itemToAdd.id === item.id;
});
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Hashids = require("hashids");
var hashids = new Hashids("this is my salt");
var sh = require("shorthash");
var redis = require("redis"),
client = redis.createClient('6379', '107.170.143.179');
var moment = require('moment');
var Cookies = require("cookies")
@mbejda
mbejda / test
Created October 30, 2014 01:22
test
alert('test')
@mbejda
mbejda / dup.sh
Last active August 29, 2015 14:19
Open A Duplicate Terminal From Your Terminal on MacOsx
open -a Terminal "`pwd`"
@mbejda
mbejda / sof.sh
Last active August 29, 2015 14:19
Simple StackOverFlow Search CLI
sof()
{
#relevance newest votes active
if [ "$1" == "" ]; then
echo "question is missing"
return 1;
fi
if [ "$2" != "" ]; then
echo \$2 is set;
tab=$2;
@mbejda
mbejda / yml
Created May 2, 2015 18:30
Cloud-Config for educational purposes. Barebones CoreOS cluster.
#cloud-config
coreos:
etcd:
discovery: [your own discovery url]
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
@mbejda
mbejda / shell
Created June 6, 2015 16:57
Provision Multiple Machines in Joyent
$ for i in {0..9}; do sdc-createmachine --name=machine-$i --package=f917d6c7-f719-44b0-9ea0-034da05602e5 --image=fbdfd7d2-0560-11e5-ab06-13badc708908 ; done