Skip to content

Instantly share code, notes, and snippets.

View Sophrinix's full-sized avatar

Andrew McElroy Sophrinix

View GitHub Profile
#! /bin/bash
# inspired by Greg McCormick's (@crushmedianet) post
# http://crushmedia.net/2012/04/23/automated-build-of-titanium-iconloading-files/
# updated 4 Aug 2012: creates clipped iPad backgrounds by cropping 768x1024, etc.
# create following base images + save in APPNAME/Resources/:
# appicon-android-512x512.png
@Sophrinix
Sophrinix / convertImages.sh
Last active December 21, 2015 07:38 — forked from bob-sims/convertImages.sh
This will be updated for alloy. If I don't finish this by 23rd of August, first person to spot that I haven't updated this for alloy gets a free beer on me at the next titanium themed conference.
#! /bin/bash
# inspired by Greg McCormick's (@crushmedianet) post
# http://crushmedia.net/2012/04/23/automated-build-of-titanium-iconloading-files/
# updated 4 Aug 2012: creates clipped iPad backgrounds by cropping 768x1024, etc.
# create following base images + save in APPNAME/Resources/:
# appicon-android-512x512.png
@Sophrinix
Sophrinix / output on second run of simulator FugitiveRow.js
Last active December 19, 2015 07:48
duplicate model objects in allow
[INFO] : iPhone Simulator log:
[INFO] : {"__iamalloy":true,"__views":{"row":{"className":"loc_row","id":"row","horizontalWrap":true,"dataId":"","model":"c30b8d57-860c-6355-a38c-e56e6a7815cf"},"__alloyId8":{"id":"__alloyId8","layout":"vertical","horizontalWrap":true,"height":"SIZE"},"name":{"text":"Nolan Wright","left":"5dp","id":"name","horizontalWrap":true,"color":"#000","right":"5dp","top":"2dp","height":"SIZE","font":{"fontSize":"24dp"}},"address":{"id":"address","horizontalWrap":true,"font":{"fontSize":"20dp"},"color":"#000"}},"row":{"className":"loc_row","id":"row","horizontalWrap":true,"dataId":"","model":"c30b8d57-860c-6355-a38c-e56e6a7815cf"},"__alloyId8":{"id":"__alloyId8","layout":"vertical","horizontalWrap":true,"height":"SIZE"},"name":{"text":"Nolan Wright","left":"5dp","id":"name","horizontalWrap":true,"color":"#000","right":"5dp","top":"2dp","height":"SIZE","font":{"fontSize":"24dp"}},"address":{"id":"address","horizontalWrap":true,"font":{"fontSize":"20dp"},"color":"#000"}}
[INFO] : {"__i
var circle = Titanium.UI.createView({
height:200,
width:200,
borderRadius:50,
backgroundColor:'#336699',
top:10,
left:50
});
currentWindow.add(circle);
@Sophrinix
Sophrinix / web.config
Created January 19, 2013 05:51
a known working web.config for IIS 7.5 HTTP verbs are explicitly listed. This uses FCGI through rack on ruby 1.9.3p194 64 bit.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<heliconZoo>
<!-- These settings are applied when IIS application pool uses 32-bit CPU mode -->
<application name="rails.project">
<environmentVariables>
<add name="HOME" value="%APPL_PHYSICAL_PATH%" />
<add name="GEM_HOME" value="&quot;%APPL_PHYSICAL_PATH%\vendor\gems\ruby\1.9.1\&quot;" />
@Sophrinix
Sophrinix / gist:4325168
Created December 18, 2012 05:00
On Ubuntu 12.04 HOW TO FIX major opcode of failed request: 154 (GLX)
If you have this error message:
glxinfo
name of display: :0.0
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 154 (GLX)
@Sophrinix
Sophrinix / ActionController::UnknownHttpMethod
Created March 27, 2012 01:53
TIL about ActionController::UnknownHttpMethod
Started POST "/users/sign_in" for 192.168.1.7 at 2012-03-26 22:42:26 -0500
Processing by Devise::SessionsController#create as URL_ENCODED_FORM
Parameters: {"username"=>"user@example.com", "password"=>"[FILTERED]"}
Completed 401 Unauthorized in 1ms
[2012-03-26 13:48:17] ERROR ActionController::UnknownHttpMethod: put, accepted HTTP methods are OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, ORDERPATCH, ACL, SEARCH, and PATCH
@Sophrinix
Sophrinix / Y-U-No-Work-MagLev
Created November 11, 2011 19:39
maglev log on my mac. you'd think a 1.0.0 release would...
I can clearly see that I am missing a demo.key file. Why? Out of the box
as a rvm install this should "just work". Here's the log:
_____________________________________________________________________________
| GemStone/S64 Object-Oriented Data Management System |
| Copyright (C) VMware, Inc. 1986-2011 |
| All rights reserved. |
+-----------------------------------------------------------------------------+
| PROGRAM: STONE, Stone Repository Monitor |
| VERSION: 3.1.0, Thu Oct 27 16:21:45 2011 |
| BUILD: gss64_maglev_branch-27184 |
@Sophrinix
Sophrinix / passenger.rb
Created October 5, 2011 03:42 — forked from tmm1/passenger.rb
eventmachine monkey-patch for passenger
# Monkey-patch for Passenger to use the EventMachine reactor.
# This allows the use of EM timers, EM.system/popen, and other async libraries (amqp, em-http-request, etc) inside a Rails process.
# This requires EM.watch which was added to EM's git repo recently. Build an EM gem first:
# git clone git://github.com/eventmachine/eventmachine
# cd eventmachine
# gem build eventmachine.gemspec
# sudo gem install eventmachine-0.12.9.gem
# Please do not use this in production =)
@Sophrinix
Sophrinix / fragment.js
Created July 9, 2011 06:06 — forked from figital/fragment.js
jslinux start()
// hi ben
function start() {
var Hf,
i,
start,
If,
Jf;
if (!Gf()) {
aa.writeln("");
aa.writeln("Your browser does not support the W3C Typed Arrays and this version of JS/Linux needs them.\n");