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
users = [] | |
["stephencurry30","kevindurant","ygtrece"].each do |fan| | |
driver.get "https://www.instagram.com/#{fan}" | |
sleep(20) | |
hrefs = [] | |
driver.find_elements(:css => "a._ndl3t").each {|a| hrefs.push a["href"]} | |
hrefs.each_with_index do |href, index| | |
puts "#{index} / #{hrefs.count}" |
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
app.factory "HauserService", [ | |
'$http', '$q', '$state', 'Notification', | |
($http, $q, $state, Notification) -> | |
handleUnauthorizedRequest = -> | |
Notification.error "Login is required" | |
$state.go HauserAppSettings.unauthorizedFallbackUrlState | |
httpRequest = (_method, _url, _data) -> | |
current_user = Hauser.User.current() |
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
class Api::Mobile::V1::GroupsController < Api::Mobile::V1::ApplicationApiController | |
acts_as_token_authentication_handler_for User | |
before_action :check_user_house_access | |
before_action :check_group_id, only: [:accept, :leave, :join] | |
before_action :check_user_group_access, only: [:accept, :leave] | |
#Todo: invite friends to group |
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
class Api::Mobile::V1::FacilitiesController < Api::Mobile::V1::ApplicationApiController | |
# include ApplicationHelper | |
acts_as_token_authentication_handler_for User | |
before_action :check_user_house_access | |
before_action :set_facility, only: [:show] | |
def index | |
return render json: Facility.where(house_id: params[:house_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
# Factories are used to give each class it's own dependency management | |
angular.module('myApp', ['ngCookies']) | |
.factory('BaseObject', ['$log', '$http', ($log, $http) -> | |
# The instance-classes are returned at the end of the factory and can be injected (unmodified) | |
class BaseObject | |
constructor: (@options) -> | |
send: (args) -> | |
$log.log('sending', args) | |
$http(args) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jquery.tokeninput.js with angular.js</title> | |
<link rel="stylesheet" type="text/css" href="components/jquery-tokeninput/styles/token-input.css"/> | |
<link rel="stylesheet" type="text/css" href="components/jquery-tokeninput/styles/token-input-facebook.css"/> | |
<script type="text/javascript" src="components/jquery/jquery.js"></script> | |
<script type="text/javascript" src="components/jquery-tokeninput/src/jquery.tokeninput.js"></script> |