This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sponsoredItems = [] | |
for i in data.xpath('ffed_item) | |
sponsored = i.xpath("div/span[@class='label--sponsored']") | |
if sponsored is not None: | |
sponsoredItems = sponsoredItems.append(i) | |
print(sponsoredItems) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sendgrid-ruby' | |
include SendGrid | |
require 'json' | |
html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title></title></head><body> | |
<div> | |
<br> | |
<%CONTACT_SYNC_HASH%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Tip people with dogecoins! | |
# You or someone you know needs to setup and run https://github.com/ninetwentyfour/tipbot | |
# Only works with hipchat | |
# ░░░░░░░░░▄░░░░░░░░░░░░░░▄░░░░ | |
# ░░░░░░░░▌▒█░░░░░░░░░░░▄▀▒▌░░░ | |
# ░░░░░░░░▌▒▒█░░░░░░░░▄▀▒▒▒▐░░░ | |
# ░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐░░░ | |
# ░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐░░░ | |
# ░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌░░░ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
params[:document][:filearrays].each do |file| | |
@document = Document.new(:document => file) | |
@document.save | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew upgrade `brew outdated | awk {'print $1'} | xargs` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function add_to_index() { | |
$projects = $this->Project->find('all'); | |
foreach($projects as $project){ | |
$indexData = array('text'=>$project['Project']['title'],'title'=>$project['Project']['title'],'description'=>$project['Project']['description'],'user_id'=>$project['Project']['user_id']); | |
$id = $project['Project']['_id']; | |
$this->addIndextank("HomkoraProjects",$id,$indexData); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://your-juggernaut-app.herokuapp.com/application.js" type="text/javascript" charset="utf-8"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#hipchat/play/hubot who's online awesomeness | |
require 'sinatra' | |
require 'hipchat-api' | |
# Public: Return a string of users in hipchat | |
# | |
# Examples | |
# | |
# /online | |
# # => 'ninetwentyfour,kkasch,lkkadiri,p5150j' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'json' | |
require 'net/http' | |
require 'open-uri' | |
require 'taglib' | |
get '/download/:url' do | |
client_id = "your client id here" | |
#pass in the url to the song and resolve it to get the song ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Deploy with capistrano | |
# | |
# Usage: | |
# deploy <repo> | |
# what can you deploy? | |
# | |
hackers = [ | |
"http://hubot-assets.s3.amazonaws.com/hackers/1.gif", | |
"http://hubot-assets.s3.amazonaws.com/hackers/2.gif", | |
"http://hubot-assets.s3.amazonaws.com/hackers/3.gif", |
NewerOlder