Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
var Twit = require('twit'); | |
var T = new Twit({ | |
consumer_key: 'Uah0TKkAhngA8nQwGc9M6PgZS', | |
consumer_secret: '8Nz0kMIe1qXmRV5VROR4pQUEmwGlnO0kFBDXCgW112TsFCzrgT', | |
access_token: '911107578746122241-DyUJM5sHlydr6acA66dJ15Jy7jVgoq4', | |
access_token_secret: 'SYyO6zf65dZzzIE18IxjxCS90RKNze8iQu1vfITU9Il12', | |
}) | |
var stream = T.stream('statuses/filter', { track: ['hey invite', 'hey code', '#hey', 'hey.com'] }); | |
console.log('twitter bot started'); | |
stream.on('tweet', function (tweet) { |
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
p "hey there give us a CC #" | |
cc_number = gets.chomp | |
def check_type(cc_number) | |
type = "Unknown" | |
type_check = cc_number[0..1].to_i | |
case type_check | |
when 34, 37 |
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
$('.form_class').submit(function( event ) { | |
var form = $('<form></form>'); | |
form.attr("method", "post"); | |
form.attr("action", "test.com"); | |
var email = $( "#id_of_field_for_email" ).val(); | |
var first_name = $( "#id_of_field_for_first_name" ).val(); | |
form.append("<input type='hidden' name='email' value=" + email + "></input>"); | |
form.append("<input type='hidden' name='first_name' value=" + first_name + "></input>"); | |
var formData = $(form).serialize(); | |
// Make AJAX request |
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
var apiUrl = 'https://YOUR_NATION_URL.nationbuilder.com/api/v1/people/push?access_token=YOUR_ACCESS_TOKEN'; | |
var data = JSON.stringify({ | |
"person":{ | |
"email":inputData.email, | |
"first_name":inputData.first_name, | |
"last_name":inputData.last_name, | |
"external_id":inputData.id, | |
"tags":[inputData.purchase], | |
} |