Skip to content

Instantly share code, notes, and snippets.

@lukebaker
lukebaker / keybase.md
Created October 1, 2016 00:20
keybase.md

Keybase proof

I hereby claim:

  • I am lukebaker on github.
  • I am lukebaker (https://keybase.io/lukebaker) on keybase.
  • I have a public key ASDXhAz1dO0_ENiwH8P1fwO06MSBX6EFaDynHXLP0iAA2go

To claim this, I am signing this object:

@lukebaker
lukebaker / user.rb
Last active December 18, 2015 09:19
# For using LDAP authentication with All Our Ideas
# The strategy is to do the authenticate via LDAP, but still create a local user
# so that the rest of site still has a proper user object to use.
#
# You'll need to add net-ldap to the Gemfile and run `bundle install`
#
# Add this to app/models/user.rb
module Clearance::User::ClassMethods
def authenticate(email, password)
ldap = Net::LDAP.new(
--- de.yml_sorted 2011-10-10 14:19:27.000000000 -0400
+++ de_user_facing_ka.txt_sorted 2011-10-10 14:23:59.000000000 -0400
@@ -1,223 +1,187 @@
- about_page:
- about_scoring: über die Stimmenvergabe
- about_this_page: Impressum
- about: über
- about_word_cloud: Wordcloud
+ about_scoring: Über die Punktzahl
+ about_this_page: Mehr über diese Seite
@lukebaker
lukebaker / frc-playlist-json.js
Created June 29, 2011 18:56
FRC Playlist JSON Example
{
"playlist" : {
"videos" : [
{
"title": "North Dakota city faces flood evacuation deadline",
"thumbnail": "/images/thumbnail.jpg",
"poster": "http://www.frc.org/img/item/MD11E02_NORMAL.jpg",
"hi": "rtmp://fms.14CB.edgecastcdn.net/0014CB/_definst_/frc/EF11F03.flv",
"med": "rtmp://fms.14CB.edgecastcdn.net/0014CB/_definst_/frc/EF11F04.flv",
"low": "rtmp://fms.14CB.edgecastcdn.net/0014CB/_definst_/frc/EF11F05.flv"
@lukebaker
lukebaker / frc-playlist-initialize.html
Created June 29, 2011 18:49
FRC Playlist Initialize
<script>
FRC.player.initialize({
element : '#container',
playlist : '/playlist/123.json',
width: '380',
height: '200',
playlistOrientation: 'vertical'
});
</script>
@lukebaker
lukebaker / example-head.html
Created June 29, 2011 18:46
FRC Playlist HTML Head
<script type="text/javascript" src="FRC.player-prod.js"></script>
<link rel="stylesheet" type="text/css" href="playlist-layout.css">
<link rel="stylesheet" type="text/css" href="playlist-colors.css">
@lukebaker
lukebaker / playlist-sample.json
Created June 22, 2011 19:55
Sample Playlist
{
"playlist" : {
"id" : "asf123",
"videos" : [
{
"id": "987zyx",
"title": "Aderholt discusses politics on national Christian Radio",
"thumbnail": "thumbnail.jpg",
"poster": "http://www.frc.org/img/item/MD11E02_NORMAL.jpg",
@lukebaker
lukebaker / widget-info.html
Created March 29, 2011 13:52
Dynamically insert widget with info code.
<div id="ideamarketplace"></div>
<script>
(function(appendTo, info) {
var el = document.createElement("iframe");
el.src = 'http://widget.allourideas.org/testmarketplace?info='+info+'&submit_button=FCC044&vote_button=FCC044&flag_text=000000&tab_hover=000000&cant_decide_button=FCC044&add_idea_button=FF7600&question_text=000000&text_on_color=000000';
el.width = '815';
el.height = '400';
el.frameborder = '0';
el.scrolling = 'no';
document.getElementById(appendTo).appendChild(el);
<div id="ideamarketplace" class="box">
<h2>Idea Marketplace</h2>
<!-- uncomment on launch day
<iframe src="http://widget.allourideas.org/princetonusg?submit_button=FCC044&vote_button=FCC044&flag_text=000000&tab_hover=000000&cant_decide_button=FCC044&add_idea_button=FF7600&question_text=000000&text_on_color=000000" width=815 height=400 frameborder=0 scrolling="no"> </iframe>
-->
<!-- default widget code
<iframe src="http://widget.allourideas.org/princetonusg" width=815 height=400 frameborder=0 scrolling="no"> </iframe>
-->
</div>
@lukebaker
lukebaker / ee-template-with-php.php
Created October 19, 2010 15:47
Stuff in EE template
<? $user_info = array(
'set.BillingEmail' => '{email}'
);
foreach ($user_info as $key => $v) {
print $user_info[$key]." == ";
print substr($user_info[$key], 0, -1)."\n";
}
print_r($user_info);
?>