Skip to content

Instantly share code, notes, and snippets.

View takouhai's full-sized avatar
🌮

daniel (taco) takouhai

🌮
View GitHub Profile

openpgp4fpr:B0DCD81A7A05D29204FA8F293A3333C917C01F2D

Keybase proof

I hereby claim:

  • I am takouhai on github.
  • I am takouhai (https://keybase.io/takouhai) on keybase.
  • I have a public key whose fingerprint is E906 8A19 28ED B6ED BA83 F295 573E 97DE 4166 CC3A

To claim this, I am signing this object:

@takouhai
takouhai / init.coffee
Last active April 24, 2019 05:52
My configuration for Atom, synced with https://github.com/atom-community/sync-settings.
# initialization file (not found)
@takouhai
takouhai / og_metadata.pug
Last active August 9, 2016 20:32 — forked from allanwhite/G+ metadata
Pug snippet for spitting out Open Graph meta tags based on a simple array. Note: various social networks have different requirements about images, etc.
- var site = {title: 'site name', url: 'http:site.com', image: '/images/thumbnail-site-square.jpg', favicon: '/favicon.ico', description: 'Site Description'}
each val, key in site // Open Graph metadata
meta( property = 'og:' + key , content = val )
# encoding: utf-8
namespace :post do
desc 'Post Tweet'
task tweet: :environment do
puts 'Post Tweet'
twitter = Twitter::REST::Client.new do |config|
config.consumer_key = ENV['TWITTER_CONSUMER_KEY']
config.consumer_secret = ENV['TWITTER_CONSUMER_SECRET']
config.access_token = ENV['TWITTER_ACCESS_TOKEN']
config.access_token_secret = ENV['TWITTER_ACCESS_SECRET']
namespace :post do
desc 'Post Tweet'
task tweet: :environment do
puts 'Post Tweet'
param = Parameter.where(name: 'twitter').first
content = Content.where("name like ? and name like ?", "%\#devHangout%", "%" + param.value.to_s + "%").sort_by{|e| e[:id]}.first
puts content.name + " https://youtu.be/" + content.provider_id
param.value = param.value + 1
param.save
end
namespace :update do
desc 'Update Twitter param'
task twitter: :environment do
puts 'Update Twitter Value to 1'
param = Parameter.where(name: 'twitter').first_or_initialize.update_attributes!(value: 1)
end
end
namespace :post do
desc 'Post Tweet'
task tweet: :environment do
end
end
░▄▀▄▀▀▀▀▄▀▄░░░░░░░░░
░█░░░░░░░░▀▄░░░░░░▄░
█░░▀░░▀░░░░░▀▄▄░░█░█
█░▄░█▀░▄░░░░░░░▀▀░░█
█░░▀▀▀▀░░░░░░░░░░░░█
█░░░░░░░░░░░░░░░░░░█
█░░░░░░░░░░░░░░░░░░█
░█░░▄▄░░▄▄▄▄░░▄▄░░█░
░█░▄▀█░▄▀░░█░▄▀█░▄▀░
░░▀░░░▀░░░░░▀░░░▀░░░