Skip to content

Instantly share code, notes, and snippets.

View Mongey's full-sized avatar

Conor Mongey Mongey

View GitHub Profile
@Mongey
Mongey / gradle.properties
Created February 24, 2014 23:54
Speed up your Android/gradle build times by adding the following file to ~/.gradle/
org.gradle.daemon=true
(def comment-data [{:author "Pete Hunt" :text "This ia comment."}
{:author "Jordan Walke" :text "This is *another* coment"}])
(into-array
(map #(om/build comment (comment-data %))
(range (count comment-data))
)
)
for(var i=0;i<52;i++) {$.post('https://powerballads.ie/ajax/vote/59',function(r){console.log(r)})}
var id,max=0;var videos= _jsdata.videos; for(var i=0;i<videos.length;i++){if( parseInt(videos[i].votes,10) >max) {max= videos[i].votes; id = videos[i]; }}; console.log(id)
### Keybase proof
I hereby claim:
* I am Mongey on github.
* I am mongeyc (https://keybase.io/mongeyc) on keybase.
* I have a public key whose fingerprint is 8745 6FE7 BFC2 5F2B 3655 5ABC E508 B991 5096 CBB4
To claim this, I am signing this object:
D/dalvikvm( 2254): GC_CONCURRENT freed 378K, 10% free 5586K/6168K, paused 2ms+0ms, total 5ms
D/dalvikvm( 2254): GC_CONCURRENT freed 1587K, 27% free 4939K/6744K, paused 1ms+0ms, total 4ms
D/dalvikvm( 2254): GC_CONCURRENT freed 378K, 22% free 5304K/6744K, paused 2ms+2ms, total 7ms
D/dalvikvm( 2254): GC_CONCURRENT freed 464K, 17% free 5660K/6744K, paused 2ms+0ms, total 5ms
D/dalvikvm( 2254): GC_CONCURRENT freed 557K, 13% free 6044K/6876K, paused 2ms+0ms, total 5ms
D/dalvikvm( 2254): GC_CONCURRENT freed 749K, 14% free 6364K/7324K, paused 2ms+0ms, total 6ms
D/Utils ( 2254): titles size : 11
D/Utils ( 2254): plots size : 11
D/Utils ( 2254): urls size : 12
D/Utils ( 2254): dates size : 11
@Mongey
Mongey / .rb
Last active August 29, 2015 14:08
class ApplicationController < ActionController::Base
before_filter :set_real_user
def set_real_user
@current_user = current_user
@current_user = current_user.primary_account if current_user
end
end
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.006 000.006: --- VIM STARTING ---
000.074 000.068: Allocated generic buffers
000.345 000.271: locale set
000.348 000.003: clipboard setup
App.derpyodo = Ember.Component.extend({
loading: true,
willInsertElement: function(){
var user_id = this.get('user-id');
var self = this;
Ember.$.ajax({
url: 'http://localhost:3000/v2/accounts/%@'.fmt(user_id),
}).then(function(resolve) {
self.set('amount', amount);
});
import ApplicationAdapter from './application';
export default ApplicationAdapter.extend({
urlForUpdateRecord: function(store, type, snapshot) {
let delta = snapshot.get('rotation_delta')
if(delta != 0){
return 'http://localhost:3000/images/' + snapshot.get('id') + '/rotate';
}
return this._super(store,type,snapshot);