This file contains hidden or 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
#!/usr/bin/env ruby | |
#-*- coding: utf-8 -*- | |
require 'twitter' | |
Twitter.configure do |config| | |
config.consumer_key = 'YOUR_COMSUMER_KEY' | |
config.consumer_secret = 'YOUR_COMSUMER_SECRET' | |
config.oauth_token = 'OAUTH_TOKEN' | |
config.oauth_token_secret = 'OAUTH_TOKEN_SERCRET' | |
end |
This file contains hidden or 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
#!/usr/bin/env ruby | |
#-*- coding: utf-8 -*- | |
require 'twitter' | |
require 'user_stream' | |
require 'active_support' | |
require 'active_support/core_ext' | |
require 'enumerable/lazy' | |
UserStream.configure do |config| | |
config.consumer_key = 'YOUR COMSUMER KEY' |
This file contains hidden or 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
#!/usr/bin/env ruby | |
#-*- coding: utf-8 -*- | |
require 'twitter' | |
require 'user_stream' | |
require 'active_support' | |
require 'active_support/core_ext' | |
require 'enumerable/lazy' | |
UserStream.configure do |config| | |
config.consumer_key = 'YOUR COMSUMER KEY' |
This file contains hidden or 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
#!/usr/bin/env ruby | |
#-*- coding: utf-8 -*- | |
require 'twitter' | |
Twitter.configure do |config| | |
config.consumer_key = 'YOUR_COMSUMER_KEY' | |
config.consumer_secret = 'YOUR_COMSUMER_SECRET' | |
config.oauth_token = 'OAUTH_TOKEN' | |
config.oauth_token_secret = 'OAUTH_TOKEN_SERCRET' | |
end |
This file contains hidden or 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
#!/usr/bin/env python | |
# coding: utf-8 | |
from math import * | |
def prime(val): | |
primes = [] | |
for i in range(2,val): | |
isPrime = True | |
for j in range(2, int(floor(sqrt(i))) + 1): | |
if i % j == 0: |
This file contains hidden or 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
Twitter.configure do |config| | |
config.consumer_key = 'YOUR_COMSUMER_KEY' | |
config.consumer_secret = 'YOUR_COMSUMER_SECRET' | |
config.oauth_token = 'OAUTH_TOKEN' | |
config.oauth_token_secret = 'OAUTH_TOKEN_SERCRET' | |
end | |
image = Twitter.user.profile_image_url() | |
p image |
This file contains hidden or 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
#!/usr/bin/env ruby | |
#-*- coding: utf-8 -*- | |
require 'twitter' | |
require 'open-uri' | |
require 'tempfile' | |
Twitter.configure do |config| | |
config.consumer_key = YOUR_CONSUMER_KEY | |
config.consumer_secret = YOUR_CONSUMER_SECRET | |
config.oauth_token = YOUR_OAUTH_TOKEN |
This file contains hidden or 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
#file name is title of article. | |
#!/usr/bin/env ruby | |
#-*- coding: utf-8 -*- | |
require 'tumblr_client' | |
Tumblr.configure do |config| | |
config.consumer_key = "YOUR_CONSUMER_KEY" | |
config.consumer_secret = "YOUR_CONSUMER_SECRET" |
This file contains hidden or 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
task :default => :new | |
desc "Create a new article." | |
task :new do | |
title = ask("Title: ") | |
article = "<pre><code class=\"prettyprint lang-ruby\"> | |
</code></pre>" | |
path = "./#{title}.txt" |
This file contains hidden or 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
#!/usr/bin/env ruby | |
#-*- coding: utf-8 -*- | |
require 'rubygems' | |
require 'tiqav' | |
require 'twitter' | |
require 'open-uri' | |
require 'tempfile' | |
Twitter.configure do |config| | |
config.consumer_key = "YOUR_CONSUMER_KEY" |