Skip to content

Instantly share code, notes, and snippets.

View typeoneerror's full-sized avatar
🤠
iOS, Capacitor, Ember, Vue, Rails

Benjamin Borowski typeoneerror

🤠
iOS, Capacitor, Ember, Vue, Rails
View GitHub Profile
#home-feature .image img {
position: relative;
top: 0;
left: 0;
transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
}
#home-feature .image:hover img {
top: -5%;
@typeoneerror
typeoneerror / main.js
Last active April 15, 2026 15:51 — forked from weotch/main.js
// This our standard require js bootstrap file. It assumes you are using the
// require-jquery.js file that require.js provides
// Set the require.js configuration for the application
require.config({
// Base path used to load scripts
baseUrl: 'js/',
// Prevent caching during dev
urlArgs: "bust=" + (new Date()).getTime(),
/********* OpenUrl.h Cordova Plugin Header *******/
#import <Cordova/CDV.h>
@interface OpenUrl : CDVPlugin
- (void)openUrl:(CDVInvokedUrlCommand*)command;
@end

To start, we have a channelPlaying bool, which is passed as a "reference" to isPlaying using the syntax &channelPlaying. This seems to be somewhat a matter of style, but there are differences, though FMOD's examples uses the & version, so I've updated it to that one.

Secondly, FMODExChannel::isPlaying is the definition of a member function on the FMODExChannel. We call that with instance->isPlaying(), not instance::isPlaying() (which would be for a class function, afaik). Both references and class/instance operators seem to be similar to PHP style, which makes sense.

- bool *channelPlaying;
- self->mChannel::isPlaying(channelPlaying);
- bool isPlaying = self->mPlayState == PLAYING && *channelPlaying;
+ FMOD_RESULT result = FMOD_OK;
Process: moai [13803]
Path: /Users/USER/*/moai
Identifier: moai
Version: ???
Code Type: X86 (Native)
Parent Process: bash [13802]
User ID: 501
Date/Time: 2013-01-29 22:07:31.561 -0800
OS Version: Mac OS X 10.8.2 (12C3103)
-- handle special cases like iPad retina
DPI_SCALE = 1
if Util.isIPadRetina () then
print ( "Why, iPad Retina; what big pixels you have." )
DPI_SCALE = 2
DISPLAY_WIDTH = 1024
@typeoneerror
typeoneerror / recursive-chmod-no-svn.sh
Created August 26, 2012 19:16
Find files and folders that aren't .svn and chmod them.
# List files
find . -name .svn -prune -o -type f -print;
# List directories
find . -name .svn -prune -o -type d -print;
# Execute chmod for files
find . -name .svn -prune -o -type f -exec chmod 644 {} \;
# Execute chmod for directories
@typeoneerror
typeoneerror / lockscroll.coffee
Created July 3, 2012 19:14
lockscroll.coffee
lockscroll = true
$('.scroll-pane').each () ->
$(this).bind 'mousewheel', (event) ->
if $(this).outerHeight() + api.getContentPositionY() >= api.getContentHeight() or api.getContentPositionY() == 0
event.preventDefault() if lockscroll
def dots_tag(count)
content = (1..count).collect do |i|
content_tag(:li) do
content_tag(:a, :href => '#', :id => "dot-#{i}") do
"Feature #{i}"
end
end
end
content.join('\n')
end
def narrow_by_tag(title, spotlist_id = 0, count = 0)
tag_id = "narrow-bg-#{spotlist_id}"
content_tag :li do
content_tag :a, :href => url do
content = check_box_tag tag_id
content << title
content << content_tag :span, :class => 'counter' { count }
end
end
end