Skip to content

Instantly share code, notes, and snippets.


Milos Bejda mbejda

Block or report user

Report or block mbejda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mbejda / gist:7375622
Created Nov 8, 2013
Ember.js : List-to
View gist:7375622
<!DOCTYPE html>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src=""></script>
<script src=""></script>
<script src=""></script>
View list-to
<!DOCTYPE html>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src=""></script>
<script src=""></script>
<script src=""></script>
View campaigns.ejs
<% 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 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>
View add_role
<?php add_role( $role, $display_name, $capabilities ); ?>
$result = add_role('basic_contributor', 'Basic Contributor', array(
'read' => true, // True allows that capability
'edit_posts' => true,
'delete_posts' => false, // Use false to explicitly deny
if (null !== $result) {
echo 'Yay! New role created!';
View Vine Response
"code": "",
"data": {
"count": 60,
"records": [{
"liked": 0,
"foursquareVenueId": null,
"userId": "958614911402057728",
"private": 0,
"likes": {
View Bootstrap DatePicker Custom Binding
ko.bindingHandlers.datepicker = {
init: function(element, valueAccessor, allBindingsAccessor) {
//initialize datepicker with some optional options
var options = allBindingsAccessor().datepickerOptions || {};
//when a user changes the date, update the view model
ko.utils.registerEventHandler(element, "changeDate", function(event) {
var value = valueAccessor();
if (ko.isObservable(value)) {
View gist:8442189
* Cart Page
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
global $woocommerce;
View gist:8625510
for(var y = 0; y < 20; y++)
console.log("Y "+y);
var temp = 0;
for(var x = 0; x < y; x++)
console.log("X "+x);
temp = temp + x;
View gist:8671545
var call = {
object: 'accounts',
method: 'get',
action: 'allInfluencers'
var accountObject = function () {
var self = this;
self.allInfluencers = function () {
mbejda / gist:8955865
Created Feb 12, 2014
Create WordPress Shell script using WP CLI
View gist:8955865
echo "Please enter some dbname: "
read dbname
mkdir $dbname
cd $dbname
wp core download
wp core config --dbname=$dbname --dbuser=root --dbhost=localhost
wp db create $dbname
wp core install --url="http://localhost" --title="Your Blog Title" --admin_user="admin" --admin_password="password" --admin_email=""
You can’t perform that action at this time.