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 | |
// clean up wp_head | |
wp_deregister_style( 'open-sans' ); | |
remove_action ('wp_head', 'rsd_link'); | |
remove_action( 'wp_head', 'wlwmanifest_link'); | |
remove_action( 'wp_head', 'wp_shortlink_wp_head'); | |
remove_action('wp_head', 'wp_generator'); | |
function keep_open_sans_in_admin() { | |
wp_register_style( 'open-sans', false ); |
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
#download rpm file from here: http://www.google.com/chrome | |
#install require packages | |
yum install lsb wget | |
#change directory to where you downloaded your RPM file and then run this: | |
sudo rpm -ivh google-chrome-stable_current_x86_64.rpm |
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
sudo yum install mercurial | |
hg clone -u release https://go.googlecode.com/hg/golang | |
#there's a fair bit of waiting at this step apparently. | |
cd golang/src | |
./all.bash | |
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
server { | |
listen 80; ## listen for ipv4; this line is default and implied | |
#listen [::]:80 default ipv6only=on; ## listen for ipv6 | |
root /var/www; index index.html index.htm; # Make site accessible from http://localhost/ servername domain.com www.domain.com; | |
location /api/ { | |
proxypass http://localhost:3000; | |
proxysetheader Host $host; | |
proxy_buffering off; |
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
server { | |
listen 80; | |
servername server.com; | |
return 301 https://$servername$requesturi; | |
} | |
server { | |
listen 443 ssl; | |
servername server.com; | |
sslcertificate /path/to/ssl/cert.pem; |
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
var Backbone = require('backbone'); | |
var template = require('templates/video'); | |
var $ = require('jquery'); | |
module.exports = Backbone.View.extend({ | |
videoUrl: '//player.vimeo.com/video/119777338', | |
events: {'click button': 'playButtonPressed'}, | |
render: function () { | |
$(this.el).html(template({url: this.videoUrl})); | |
$('body').append(this.el); | |
this.$player = $('iframe'); |
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
# create app | |
app = flask.Flask(__name__) app.config['DEBUG'] = True | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'databaseurlgoeshere' | |
db = flask.ext.sqlalchemy.SQLAlchemy(app) | |
# models | |
class User(db.Model): | |
id = db.Column(db.Integer, primary_key=True, autoincrement=True) |
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
// Require | |
var watchr = require('watchr'); | |
var exec = require('child_process').exec; | |
watchr.watch({ | |
paths: ['js', 'css', 'templates'], | |
listeners: { | |
error: function (err) { | |
console.log('an error occured:', err); | |
}, change: function () { |
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
public class EntityList extends Model { | |
@Id | |
private Integer id; | |
@Constraints.Required | |
public String title; | |
@Constraints.Required | |
public String type; |
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
//return a collection of items | |
public static Result getAssets() { | |
List<Asset> asset = Ebean.find(Asset.class) | |
.findList(); | |
return ok(toJson(asset)); | |
} | |
//or return a single item with the id being passed as a url param | |
public static Result getAsset(Integer id) { |
OlderNewer