View results
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
http://www.independent.co.uk/news/uk/crime/abortion-site-hacker-james-jeffery-jailed-7643734.html | |
http://www.theguardian.com/world/2012/apr/13/bpas-hacker-james-jeffery-jailed | |
https://www.judiciary.gov.uk/wp-content/uploads/JCO/Documents/Judgments/james-jeffery-sentencing-remarks-13042012.pdf | |
http://www.alphr.com/life-culture/1000788/what-happened-to-the-hacktivists | |
https://www.facebook.com/public/James-Jeffery | |
http://www.telegraph.co.uk/news/uknews/crime/9135839/Hacker-stole-records-of-10000-women-from-abortion-provider.html | |
https://uk.linkedin.com/pub/dir/James/Jeffery | |
http://www.dailymail.co.uk/news/article-2129432/BPAS-hacker-James-Jeffery-broke-website-Britains-biggest-abortion-provider-jailed.html | |
https://en.wikipedia.org/wiki/James_Franklin_Jeffrey | |
http://metro.co.uk/2012/04/13/anonymous-affiliated-james-jeffery-jailed-for-hacking-abortion-website-387368/ |
View Google scraping test with node
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
import google from "google" | |
google.resultsPerPage = 25 | |
let nextCounter = 0 | |
google('james jeffery', (err, result) => { | |
if(err) console.error(err); | |
for(let i = 0; i < result.links.length; ++i) { | |
let link = result.links[i]; |
View JS Lambda Calculus Boolean
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
IF = function(cond) { | |
return function(thn) { | |
return function(els) { | |
return cond(thn)(els); | |
} | |
} | |
} | |
tru = function(thn) { | |
return function(els) { |
View AuthRoutes.php
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
<?php | |
namespace QuizApp\Routes; | |
use \Psr\Http\Message\ServerRequestInterface; | |
use \Psr\Http\Message\ResponseInterface; | |
use \Psr\Http\Message\RequestInterface; | |
$app->get('/login', function(ServerRequestInterface $req, ResponseInterface $resp) use ($config) { |
View UserSessionService.php
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
<?php | |
namespace QuizApp\Services; | |
class UserSessionService { | |
private $app; | |
private $container; | |
public function __construct($app, $container) |
View index.php
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
<?php | |
session_start(); | |
define('ROOT_PATH', __DIR__ . '/../'); | |
define('VENDOR_PATH', __DIR__ . '/../QuizApp/vendor/'); | |
define('CONFIG_PATH', __DIR__ . '/../QuizApp/config/'); | |
define('CONTROLLERS_PATH', __DIR__ . '/../controllers/'); | |
define('TEMPLATE_PATH', __DIR__ . '/../QuizApp/temlates/'); | |
define('APP_PATH', __DIR__ . '/../QuizApp/'); |
View gist:c2eab21f8941e3c4acb9
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
from flask import Blueprint, render_template, abort, jsonify, request | |
from flask.ext.login import login_required, current_user | |
from sqlalchemy.orm.exc import NoResultFound | |
from app import app, db | |
from app.models import Vote, Selfie | |
import datetime | |
vote_blueprint = Blueprint('vote', __name__, template_folder='templates') | |
def add_vote(user_id, selfie_id): |
View gist:674eb7e8dde675789936
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.route('/vote/<int:selfie_id>', methods=['GET']) | |
def vote(selfie_id): | |
selfie = models.Selfie.query.filter_by(id=selfie_id).first() | |
if not selfie: | |
return jsonify(error="Something went wrong.") | |
# Check if the user has already voted on this item | |
this_vote = models.Vote.query.filter_by(user_id=current_user.id, selfie_id=selfie_id).first() |
View gist:fad38205068ffb904685
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
#!/home/drspock/scripts/FBInvite/bin/python | |
import argparse | |
import requests | |
import pyquery | |
def login(session, email, password): | |
''' | |
Attempt to login to Facebook. Returns user ID, xs token and |
View gist:702d1ad9a29ec33b347f
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
Index.php | |
========= | |
// Setup the view | |
$di->set('view', function() use ($config){ | |
// Create an events manager | |
$eventsManager = new EventsManager(); | |
$eventsManager->attach('view:afterRender', new BanWordsPlugin()); | |
$view = new View(); |
NewerOlder