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
| # app/jobs/custom_job.rb | |
| class CustomJob < Struct.new(:record_id) | |
| def perform | |
| record = Record.find record_id | |
| record.attachment_one | |
| record.attachment_two | |
| end | |
| end |
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
| #include <stdio.h> | |
| #include <SDL2/SDL.h> | |
| #include "glew.h" | |
| //#include <GL/glut.h> | |
| #include <SDL2/SDL_opengl.h> | |
| #include <stdbool.h> | |
| void close(GLuint gProgramID, SDL_Window *window); | |
| bool initGL(GLuint *gProgramID, GLint *gVertexPos2DLocation, GLuint *gVBO, GLuint *gIBO); | |
| void printProgramLog(GLuint program); |
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
| if (me.video.isCanvas()) { | |
| var context = renderer.getContext(); | |
| context.strokeStyle = "red"; | |
| context.lineWidth = 2; | |
| context.strokeRect(x, y, width, height); | |
| } | |
| else { | |
| renderer.setColor("red"); | |
| renderer.strokeRect(x, y, width, height); | |
| } |
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
| // | |
| // BarcodeViewController.m | |
| // HSTestApp | |
| // | |
| // Created by McLeod, Aaron on 2014-08-14. | |
| // Copyright (c) 2014 McLeod, Aaron. All rights reserved. | |
| // | |
| #import "BarcodeViewController.h" | |
| #import "HTMLViewHelper.h" |
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 me = {}; | |
| (function () { | |
| /** | |
| * Convert first character of a string to uppercase, if it's a letter. | |
| * @ignore | |
| * @function | |
| * @name capitalize | |
| * @param {String} str Input string. | |
| * @return {String} String with first letter made uppercase. |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title></title> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width, maximum-scale=1.0" /> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> | |
| </head> | |
| <body> | |
| <div ng-app="myapp"> |
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
| <platform name="ios"> | |
| <!-- iOS 8.0+ --> | |
| <!-- iPhone 6 Plus --> | |
| <icon src="res/ios/[email protected]" width="180" height="180" /> | |
| <!-- iOS 7.0+ --> | |
| <!-- iPhone / iPod Touch --> | |
| <icon src="res/ios/Icon-60.png" width="60" height="60" /> | |
| <icon src="res/ios/[email protected]" width="120" height="120" /> | |
| <!-- iPad --> | |
| <icon src="res/ios/Icon-76.png" width="76" height="76" /> |
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
| class DataSource { | |
| createSchema () { | |
| var connection = this.getConnection(); | |
| this.transaction(connection).then((tx) => { | |
| tx.executeSql("CREATE TABLE IF NOT EXISTS interactions (id integer PRIMARY KEY, start_date varchar(50), end_date varchar(50), first_name varchar(100), last_name varchar(100), email varchar(150))"); | |
| }).catch(() => { | |
| console.log("Could not create 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
| # config valid only for current version of Capistrano | |
| lock '3.3.5' | |
| set :application, 'desert' | |
| set :repo_url, '[email protected]:agmcleod/dune.git' | |
| set :assets_roles, [:web, :app] | |
| # Default branch is :master | |
| # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call |
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
| states = { "Alaska" => "AK", | |
| "Alabama" => "AL", | |
| "Arkansas" => "AR", | |
| "American Samoa" => "AS", | |
| "Arizona" => "AZ", | |
| "California" => "CA", | |
| "Colorado" => "CO", | |
| "Connecticut" => "CT", | |
| "District of Columbia" => "DC", | |
| "Delaware" => "DE", |