Skip to content

Instantly share code, notes, and snippets.

def archive_channel(id)
channel = Channel.find(id)
fullscreen = User.find("4df13267aa7f960021000001")
channel.remove_user( channel.channel_master.uid ) if channel.channel_master.present?
channel.update_channel({name:"archived_#{channel.name}", youtube_uid:"archived_#{channel.youtube_id}" })
channel.update_attributes(name:"archived_#{channel.name}", network_id: "4e68f7e0dfaebd0001000110", youtube_id:"archived_#{channel.youtube_id}")
channel.add_user( fullscreen.uid )
channel.videos.each { |vid| vid.update_attributes(youtube_video_id:"archived_#{vid.youtube_video_id}", title:"archived_#{vid.title}")}
end
results = "month,chan1_earnings,chan2_earnings,chan_total_earnings,user_earnings,same?\n"
u1 = "4e8b13ae6ef2a600010000e4"
c1 = "4e8f1f202d1442000100018f"
c2 = "4e8b13ad6ef2a600010000e3"
months = [-6..-1]
earn1 = []
earn2 = []
u_earn = []
@mmeigooni
mmeigooni / file.html
Last active August 29, 2015 14:07
HTML only boilerplate
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<title>Your title</title>
@mmeigooni
mmeigooni / Class URLs
Created October 9, 2014 20:58
Picture URLs
http://i.imgur.com/qSvP7yH.png
http://i.imgur.com/Z1rBkXc.png
http://i.imgur.com/W4kB20z.png
http://i.imgur.com/pNg5Pb9.png
http://i.imgur.com/aOnVcMt.png
http://i.imgur.com/M13Ftom.png
http://i.imgur.com/B5T24uN.png
http://i.imgur.com/Qn0J5Cw.png
http://i.imgur.com/YVwp46d.png
http://i.imgur.com/1gFHZxP.png
@mmeigooni
mmeigooni / Grid outline
Created October 14, 2014 19:19
Section/container/row/col
<section>
<div class="container">
<div class="row">
<div class="col-md-X">
</div>
</div>
</div>
</section>
/**
Number Exercises:
*/
/**
EXERCISE One: Enter the following expressions into your console.
*/
1 + 2
3 * 5
/**
Number Exercises:
*/
/**
EXERCISE One: Enter the following expressions into your console.
*/
1 + 2
3 * 5
/**
Pair Programming Practice. Submit a link to your gist here when you are done:
https://goo.gl/forms/mPumIHpIKF3W1gjt2
*/
/**
EXERCISE ONE
What is wrong with the following definitions of square? Write a sentence or two describing the issue(s); then,
/**
W1D2 Exercises
*/
/** SECTION ONE - Booleans Conditionals */
/**
EXERCISE ONE
1. Type the two boolean values -- true and false -- into your console.
{
"name": "Reactor Prep",
"description": "Learn to Code",
"author": "Fred Zirdung <[email protected]>",
"syllabus": [
"reading/index.md"
],
"phases": {