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
package com.webninja.usjr.rest; | |
import android.app.Dialog; | |
import android.app.DialogFragment; | |
import android.app.FragmentManager; | |
import android.os.Bundle; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.Window; |
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
MEAN Stack - AWS | |
Installing NodeJS on CenOS/AWS Linux AMI | |
yum -y update | |
yum -y groupinstall "Development Tools” | |
yum -y install screen | |
cd /usr/src | |
wget http://nodejs.org/dist/v0.10.4/node-v0.10.4.tar.gz | |
tar zxf node-v0.10.4.tar.gz | |
cd node-v0.10.4 |
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
installing node on ubuntu 12.0 | |
sudo apt-get update | |
sudo apt-get install python-software-properties python g++ make | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs | |
sudo npm install npm -g | |
Install Mongo |
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
'use strict'; | |
/** | |
* Module dependencies. | |
*/ | |
var mongoose = require('mongoose'), | |
AWS = require('aws-sdk'), | |
exec = require('child_process').exec, | |
fs = require('fs'), | |
name = new Date().toISOString(); |
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
angular.module('mymodule').filter('ucfirst', function() { | |
return function(input,arg) { | |
return input.replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); }); | |
}; | |
}); |
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
<?php | |
class BaseModel extends Eloquent { | |
public function columns(){ | |
$table = $this->getTable(); | |
return DB::select(" SHOW COLUMNS FROM ".$table); | |
} |
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
<?php | |
echo wp_menu_fix('main'); | |
function wp_menu_fix($menu){ | |
$menus = wp_get_nav_menu_items($menu); |
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
_.mixin({ | |
serialize:function(el){ | |
var url = []; | |
_.map(el.getChildren(),function(value,key,el){ | |
if(!_.isUndefined(value.name)){ | |
url.push(value.name+ '=' + value.getValue()); | |
} | |
}); | |
return '?'+url.join('&'); |
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
use Assetic\AssetManager; | |
use Assetic\Asset\AssetCollection; | |
use Assetic\Asset\FileAsset; | |
use Assetic\Asset\GlobAsset; | |
use Assetic\Filter\Yui; | |
use Assetic\AssetWriter; | |
$am = new AssetManager(); |
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
<?php | |
function wpcebu_customize_register( $wp_customize ){ | |
// Full Name | |
$wp_customize->add_section( 'content', | |
array( | |
'title' => __( 'Full Name', 'wpcebu2' ), //Visible title of section | |
) | |
); |