Skip to content

Instantly share code, notes, and snippets.

View JamesTheHacker's full-sized avatar

0xDEADBEEF JamesTheHacker

  • United Kingdom
View GitHub Profile
<?php
namespace StudentApp\Services\Email;
abstract class EmailService
{
protected $emailService;
protected $template;
protected $logger;
<?php
namespace StudentApp\Services;
class EmailService extends Service
{
public function sendPasswordResetToken($code, $email, $firstname, $lastname)
{
/*
* Load the HTML from templates file
$container['EmailService'] = function($c) {
return new \StudentApp\Services\EmailService($c);
};
// Replace with this
$container['\StudentApp\Services\EmailService::class'] = function($c) {
return new \StudentApp\Services\EmailService();
};
/*
* Email Verification
*/
$container['EmailService'] = function($c) {
return new \StudentApp\Services\EmailService($c);
};
/*
* Email Verification
*/
object(StudentApp\Models\MobileVerification)#101 (23) {
["table":protected]=>
string(19) "mobile_verification"
["connection":protected]=>
NULL
["primaryKey":protected]=>
string(2) "id"
["keyType":protected]=>
string(3) "int"
["perPage":protected]=>
$userValidation->is_used = 1;
$userValidation->verified_at = $carbon::now();
$userValidation->user->update([
'email_verified' => 1
]);
$userValidation->save();
<?php
// {NONE, LIKE, LOVE, WOW, HAHA, SAD, ANGRY, THANKFUL}
require __DIR__ . '/vendor/autoload.php';
use Intervention\Image\ImageManagerStatic as Image;
$pageID = '';
$accessToken = '';
ffmpeg \
-re -y \
-loop 1 \
-f image2 \
-i img_0.jpg \
-i audio.mp3 \
-acodec libfdk_aac \
-ac 1 \
-ar 44100 \
-b:a 128k \
@JamesTheHacker
JamesTheHacker / Session.js
Last active April 30, 2024 13:33
Log into Facebook using cookies
'use strict'
let Promise = require('bluebird');
let fs = Promise.promisifyAll(require('fs'));
let Cheerio = require('cheerio');
let Request = require('request');
let ToughCookie = require('tough-cookie');
class Session {
@JamesTheHacker
JamesTheHacker / Event.js
Created August 22, 2016 22:23
Promise based Facebook Event ID scraper
'use strict'
let Promise = require('bluebird')
let _ = require('lodash')
class Event {
constructor(session) {
this.session = session;
this.scrapedIDs = [];
}