Skip to content

Instantly share code, notes, and snippets.

View Mongey's full-sized avatar

Conor Mongey Mongey

View GitHub Profile
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)
for(var i=0;i<52;i++) {$.post('https://powerballads.ie/ajax/vote/59',function(r){console.log(r)})}
(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))
)
)
@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
@Mongey
Mongey / 0_reuse_code.js
Created October 3, 2013 20:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
require 'RMagick'
include Magick
width = 90
height = 100
matrix = [
[0,1,0,0,0],
[0,1,0,0,0],
[0,0,1,0,0],
[0,1,0,0,0],
[0,1,0,0,0],
@Mongey
Mongey / fetch.rb
Created October 20, 2012 16:49
CS3071 Compiler Upload / Compile Script
#!/usr/bin/env ruby
# ______ _ _
# | ___ \ (_) |
# | |_/ /_ __ ___ _ __ _| | ___ _ __
# | ___ \ '__/ _ \| '_ \| | |/ _ \ '__|
# | |_/ / | | (_) | |_) | | | __/ |
# \____/|_| \___/| .__/|_|_|\___|_|
# | |
# |_|
require 'net/scp'
class Employee < ActiveRecord::Base
has_many :timeslots
scope :free_time, lambda {|day| joins(:timeslots).merge(Timeslot.on(day)) }
end
promptList (x:[]) partial = do
putStrLn ("Enter value for " ++ x)
input<-getLine
(partial ++ [input])
promptList (x:xs) partial = do
putStrLn ("Enter value for " ++ x)
input<-getLine
promptList xs (partial ++ [input])
public class Message{
public String recipient, sender,body;
public Message(String recipient, String sender,String body){
this.recipient=recipient;
this.sender=sender;
this.body = body;
}
public void append(String text){
this.body = this.body + text;