Skip to content

Instantly share code, notes, and snippets.

View atticoos's full-sized avatar
🧑‍💻
building Rally

Atticus White atticoos

🧑‍💻
building Rally
View GitHub Profile
<?php
return array(
'database.primary.host' => '127.0.0.1',
'database.primary.database' => 'bodimojo',
'database.primary.username' => 'root',
'database.primary.password' => 'root',
NameVirtualHost *:443
<IfModule mod_ssl.so>
<VirtualHost *:443>
ServerName yourserver.com
DocumentRoot /var/www/site
SSLEngine on
SSLCertificateFile ssl.crt
SSLCertificateKeyFIle ssl.key
SSLCertificateChainFile chain.crt
</VirtualHost>
NameVirtualHost *:443
<IfModule mod_ssl.so>
<VirtualHost *:443>
ServerName domain_a.com
DocumentRoot /var/www/site_a
SSLEngine on
SSLCertificateFile ssl_a.crt
SSLCertificateKeyFIle ssl_a.key
SSLCertificateChainFile chain.crt
</VirtualHost>
function MyService () {
var sharableData = [];
return {
data: sharableData,
doSomething: function () {
webSocket.on('gettinData', function (data) {
sharableData.push(data);
});
}
import Foundation
import CoreData
@objc(Tasks) // add this
class Tasks: NSManagedObject {
@NSManaged var taskID: String
@NSManaged var desc: String
@NSManaged var ingredientsList: NSSet
var upl = panda.uploader.init({
'buttonId': 'browse',
'progressBarId': 'progress-bar',
'onQueue': function(files) {
$.each(files, function(i, file) {
upl.setPayload(file, {'csrf': "<%= form_authenticity_token %>"});
})
},
'onSuccess': function(file, data) {
$("#panda_video_id").val(data.id)
var gulp = require('gulp'),
concat = require('gulp-concat'),
templateCache = require('gulp-angular-templatecache');
gulp.task('compile', function () {
gulp.src('src/scripts/**/*.js')
.pipe(concat('main.js'))
.dest('dist/');
});
var gulp = require('gulp'),
concat = require('gulp-concat'),
templateCache = require('gulp-angular-templatecache'),
eventStream = require('event-stream');
gulp.task('build', function () {
var javascriptStream = gulp.src('src/**/*.js'),
htmlStream = gulp.src('src/**/*.html');
htmlStream.pipe(templateCache());
eventStream.merge(javascriptStream, htmlStream)
<div class="something">
<?php
$bannerImage = get_field('top_banner_image');
if (empty($bannerImage)) $bannerImage = get_field('default_banner_image', 'option');
?>
<header style="background-image: url(<?php echo $bannerImage; ?>)">
<h1><?php the_field('top_title'); ?></h1>
<p><?php the_field('top_excerpt'); ?></p>
</header>
<section>
<?php
class WP_PageModel {
function __construct ($postID = false) {
global $post;
$this->postID = $postID ? $postID : $post->ID;
}
protected function fillModelAttributes(&$attribute, $data) {
$attribute = new stdClass();