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
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
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
| global.THREE = require("three"); | |
| const canvasSketch = require('canvas-sketch'); | |
| const Random = require('canvas-sketch-util/random'); | |
| const gradientHeight = 512; | |
| const settings = { | |
| dimensions: [ 2048, gradientHeight * 2 ] | |
| }; |
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 writeTextToFile = function(text, filePath) { | |
| var t = [NSString stringWithFormat:@"%@", text], | |
| f = [NSString stringWithFormat:@"%@", filePath]; | |
| return [t writeToFile:f atomically:true encoding:NSUTF8StringEncoding error:nil]; | |
| } | |
| var readTextFromFile = function(filePath) { | |
| var fileManager = [NSFileManager defaultManager]; | |
| if([fileManager fileExistsAtPath:filePath]) { | |
| return [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; |
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
| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |
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 'rubygems' | |
| require 'middleman/rack' | |
| protected_middleman = Rack::Auth::Basic.new(Middleman.server) do |username, password| | |
| [username, password] == ['theuser', 'thepassword'] | |
| end | |
| run protected_middleman |
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
| //Convert to Text Area | |
| //Justin Putney | |
| //http://ajarproductions.com | |
| //v1.0.2 | |
| var doc = app.activeDocument; | |
| var sel = doc.selection; | |
| for (var i=0; i < sel.length; i++){ | |
| if(sel[i].typename == "TextFrame") { | |
| if(sel[i].kind == TextType.POINTTEXT || sel[i].kind == TextType.PATHTEXT){ |
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 'rack' | |
| require 'sinatra/base' | |
| require 'uuidtools' | |
| require 'rest-client' | |
| require 'eventmachine' | |
| require 'json' | |
| require_relative './cache' | |
| class Worker < EM::Connection | |
| attr_reader :query |