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
<?php | |
$url ="https://arion.nationbuilder.com/api/v1/imports?access_token=d80bd609b7634d77fb6f38a444cfb093da6c596c98b49fc0099ff8864e30d8b8"; | |
$data = array( | |
"import" => array( | |
"file" => "aWQsZmlyc3RfbmFtZSxsYXN0X25hbWUNCjEsQnlyb24sQW5kZXJzb24", | |
"type" => "people", | |
"is_overwritable" => true | |
) |
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
public static void CreateSignup(string fName, string lName, string state, string phone, string zip, string userId, string email) | |
{ | |
try | |
{ | |
string NB_ID = string.Empty; | |
using (WebClient NB_API_Client = new WebClient()) | |
{ | |
NB_API_Client.Headers["Content-type"] = "application/json"; | |
NB_API_Client.Headers["Accept"] = "application/json"; | |
NB_API_Base = 'arion.nationbuilder.com' |
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
<?php | |
require('Client.php'); | |
require('IGrantType.php'); | |
require('AuthorizationCode.php'); | |
const CLIENT_ID = 'e8fefc347be6be281bf217d254cbdd5c4ec21f9ea889bfeee3d87bd95222ad9f'; | |
const CLIENT_SECRET = '958abd92ca65034f6966c22a579abf93cba220b36831a04fc73e98ed11d0093a'; | |
const REDIRECT_URI = "http://example.com/"; | |
const AUTHORIZATION_ENDPOINT = "https://arion.nationbuilder.com/oauth/authorize"; |
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
<?php | |
//put in your nation slug and token | |
$url ="https://<your slug>.nationbuilder.com/api/v1/people?access_token=<token>"; | |
$data = array( | |
'person' => array( | |
'email' => "[email protected]", | |
'last_name' => "Bob", | |
'first_name' => "Smith", |
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
<?php | |
$url ="https://labourclp188.nationbuilder.com/api/v1/sites/labourclp188/pages/basic_pages?access_token=1dbc3ed982c56e725e5d1fc4739be05f3c5b26ad5d3ac407b5cb54bcda4849c9"; | |
$data = array( | |
'basic_page' => array( | |
'slug' => "my-page", | |
'status' => "published", | |
'name' => "my-page", | |
'headline' => "my-page", |
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
source 'http://rubygems.org' | |
ruby '1.9.3' | |
gem 'rails', github: 'rails/rails', :branch => '4-0-stable' | |
gem 'pg' | |
gem 'thin' | |
gem 'draper' # decorator | |
gem 'friendly_id' | |
gem 'omniauth' | |
gem 'omniauth-facebook', '1.4.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
load 'deploy/assets' | |
# main details | |
set :rails_env, 'production' | |
set :application, "cookthisforme.com" | |
role :web, '54.221.217.103' | |
role :app, '54.221.217.103' | |
role :db, '54.221.217.103', :primary => true | |
set :user, "deploy" | |
set :deploy_to, "/var/www/#{application}" |
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
require 'csv' | |
CSV.foreach('spec/fixtures/voters/hi/2013-03-07.clean', headers: true, col_sep: ',') do |row| | |
date = Date.strptime(row['registration_date'], '%m%d%y') rescue nil | |
p row['registration_date'] unless date | |
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
[out :: 54.221.217.103] /home/deploy/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:216: warning: Insecure world writable dir /var/www in PATH, mode 040777 | |
** [out :: 54.221.217.103] WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8 | |
** [out :: 54.221.217.103] | |
** [out :: 54.221.217.103] rake aborted! | |
** [out :: 54.221.217.103] undefined method `default_values' for #<Class:0x000000067598f0> | |
** [out :: 54.221.217.103] /var/www/inteliset.com/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/dynamic_matchers.rb:55:in `method_missing' | |
** [out :: 54.221.217.103] /var/www/inteliset.com/releases/20131122030549/app/models/user.rb:14:in `<class:User>' | |
** [out :: 54.221.217.103] /var/www/inteliset.com/releases/20131122030549/app/models/user.rb:1:in `<top (required)>' | |
** [out :: 54.221.217.103] /var/www/inteliset.com/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require' | |
** [out : |
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
class DailyWorker | |
include Sidekiq::Worker | |
include Sidetiq::Schedulable | |
# Daily at midnight | |
recurrence { daily } | |
def perform | |
User.includes(:profile).where("profiles.daily_email" => true) do |u| | |
ReminderMailer.remind_email(u).deliver |