Skip to content

Instantly share code, notes, and snippets.

View Codercise's full-sized avatar

Nick Hayden Codercise

View GitHub Profile
var pathList;
var pathArray = [];
function getPictureItems() {
var picturesLibrary = Windows.Storage.KnownFolders.picturesLibrary;
picturesLibrary.getItemsAsync().then(function (items) {
items.forEach(function (item) {
pathArray.push({
name: item.fileName,
path: item.path
});
def create
@gym = Gym.find(params[:gym_id])
@user = User.find_by_email(params[:email])
@membership = Membership.new(gym_id: @gym.id, user_id: @user.id, role: :role)
if @membership.save
redirect_to gym_memberships_path(@gym.id)
else
render 'new'
end
end
@Codercise
Codercise / data.js
Created September 17, 2013 23:35
I need to be able to put non-rss items into the list variable (L135) so I can display them on another page.
(function () {
"use strict";
//Set up array vars
var dataPromises = [];
var blogs = [
{
key: "asmsBlog",
url: "http://asms.sa.edu.au/feed/",
title: "Latest ASMS News", updated: "tbd",
class UsersController < ApplicationController
def new
if signed_in?
redirect_to user_path(current_user.id)
else
@user = User.new
end
end
def create
server {
listen 80;
server_name c32.carsekyx.eu;
location / {
root /home/nickhayden/www_dev/c32;
}
}
[ 2013-06-14 02:22:33.3292 16729/b59feb40 Pool2/Implementation.cpp:1174 ]: [App 16747 stderr]
[ 2013-06-14 02:22:33.3292 16729/b59feb40 Pool2/Implementation.cpp:1174 ]: [App 16747 stderr]
[ 2013-06-14 02:22:36.2933 16729/b59feb40 Pool2/Implementation.cpp:1174 ]: [App 16747 stderr]
[ 2013-06-14 02:22:36.2934 16729/b59feb40 Pool2/Implementation.cpp:1174 ]: [App 16747 stderr] SQLite3::CantOpenException (unable to open database file):
[ 2013-06-14 02:22:36.2934 16729/b59feb40 Pool2/Implementation.cpp:1174 ]: [App 16747 stderr] activerecord (4.0.0.rc1) lib/active_record/connection_adapters/sqlite3_adapter.rb:24:in `initialize'
[ 2013-06-14 02:22:36.2934 16729/b59feb40 Pool2/Implementation.cpp:1174 ]: [App 16747 stderr] activerecord (4.0.0.rc1) lib/active_record/connection_adapters/sqlite3_adapter.rb:24:in `new'
[ 2013-06-14 02:22:36.2934 16729/b59feb40 Pool2/Implementation.cpp:1174 ]: [App 16747 stderr] activerecord (4.0.0.rc1) lib/active_record/connection_adapters/sqlite3_adapter.rb:24:in `sqlite3_connectio
App.FoodController = Ember.ArrayController.extend({
addFood: function(food) {
var table = this.controllerFor('table').get('model'),
tabItems = table.get('tab.tabItems');
tabItems.createRecord({
food: food,
cents: food.get('cents')
});
}
});
<?php
$form_data = array(
'school' => $_POST['school_name'],
'applicants_number' => $_POST['applicants_number'],
'teacher_name' => $_POST['teachers_name'],
'role' => $_POST['role'],
'phone' => $_POST['phone'],
'email' => $_POST['email'],
'principal' => $_POST['principal'],
'address' => $_POST['address'],
[Tue Apr 23 11:08:43 2013] [error] [client 122.49.141.222] PHP Notice: A session had already been started - ignoring sess ion_start() in /var/www/NoseyHam/admin/sessions/auth.php on line 2
[Tue Apr 23 11:08:43 2013] [error] [client 122.49.141.222] PHP Notice: Undefined variable: page_locked in /var/www/NoseyH am/admin/sessions/auth.php on line 3
[Tue Apr 23 11:08:43 2013] [error] [client 122.49.141.222] PHP Notice: Undefined variable: logged_in_locked in /var/www/N oseyHam/admin/sessions/auth.php on line 10
[Tue Apr 23 11:08:43 2013] [error] [client 122.49.141.222] PHP Parse error: syntax error, unexpected '/' in /var/www/Nose yHam/actions/business/all.php on line 4
[Tue Apr 23 11:08:44 2013] [error] [client 122.49.141.222] File does not exist: /var/www/NoseyHam/favicon.ico
[Tue Apr 23 11:09:39 2013] [error] [client 122.49.141.222] PHP Notice: A session had already been sta
@Codercise
Codercise / black.html
Created April 16, 2013 13:44
finally
<html>
<head>
<title>JavaScript Blackjack</title>
</head>
<body>
<h3>Welcome to JavaScript Blackjack</h3>
<p id="dealerCards"></p>
<p id="dealerTotal"></p>
<p id="currentCards"></p>