Skip to content

Instantly share code, notes, and snippets.

View HumanG33k's full-sized avatar
🐒
I may be slow to respond.

HumanG33k HumanG33k

🐒
I may be slow to respond.
View GitHub Profile
@HumanG33k
HumanG33k / oneControler.php
Created August 19, 2016 19:52
cake date trouble
// value in database and in user entity "end": "2083-08-19T19:22:07+0000"
// code from a controller (not user one)
use Cake\I18n\Time;
$duration='12';
$time = new Time();
$time = new Time();
if(!$user->finish()){
$time = Time::now();
<?php
namespace App\Model\Table;
use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;
/**
* Cars Model
@HumanG33k
HumanG33k / upwned247.php
Created November 30, 2016 16:37 — forked from Wack0/upwned247.php
UCam247/Phylink/Titathink/YCam/Anbash/Trivision/Netvision/others IoT webcams : remote code exec: reverse shell PoC. (works only in qemu usermode)
<?php
/*
NB: THIS PoC ONLY WORKS IN QEMU USERMODE EMULATION!
If anyone wants to fix this, go ahead (no pun intended).
However, I don't have a vulnerable product and am unwilling to acquire one.
-------------------------
UCam247/Phylink/Titathink/YCam/Anbash/Trivision/Netvision/others
remote code exec: reverse shell PoC.
@HumanG33k
HumanG33k / cake.php
Created June 6, 2017 14:07
app config
/**
* Connection information used by the ORM to connect
* to your application's datastores.
* Do not use periods in database name - it may lead to error.
* See https://github.com/cakephp/cakephp/issues/6471 for details.
* Drivers include Mysql Postgres Sqlite Sqlserver
* See vendor\cakephp\cakephp\src\Database\Driver for complete list
*/
'Datasources' => [
'default' => [
@HumanG33k
HumanG33k / gist:0b6c21d693d21b9c3df11ec17ce22902
Created June 13, 2017 22:49 — forked from atcuno/gist:3425484ac5cce5298932
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

class UploadComponent extends Component {
private $max_files = 3;
private $storage = WWW_ROOT.'alarm';
private $typemine = array
(
'audio/ogg',
'audio/mpeg',
'audio/mpeg4-generic',
'audio/mp4',
'audio/vorbis'
@HumanG33k
HumanG33k / plate-snitch.js
Created September 9, 2017 21:13 — forked from taitems/plate-snitch.js
(Extract) Check the status of a vehicle registration and scrape results.
// Open form and submit enquire for `rego`
function getInfo(rego) {
horseman
.userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
.open(url)
.type('#registration-number-ctrl input[type=text]', rego)
.click('.btn-holder input')
.waitForSelector('.ctrl-holder.ctrl-readonly')
.html()
.then(function(body) {
@HumanG33k
HumanG33k / README.md
Created August 22, 2018 15:27
Mutt + gmail + isync mbsync + multiple accounts

Mutt + isync multiple accounts

Mutt mail with multiple gmail accounts synced by mbsync, easy to browse in just one keypress. iSync (aka mbsync) is modular, handles multiple accounts (Gmail, Yahoo, Outlook) with ease, and syncs much faster than IMAP.

~/
|── .mutt/
|   β”œβ”€β”€ muttrc
|   β”œβ”€β”€ work
| └── work/
@HumanG33k
HumanG33k / jessie2stretch.sh
Created September 26, 2018 18:34 — forked from waja/README.md
Migration from Debian Jessie to Stretch
Please also refer to http://www.debian.org/releases/stretch/releasenotes and use your brain!
# upgrade to UTF-8 locales (http://www.debian.org/releases/stretch/amd64/release-notes/ap-old-stuff.en.html#switch-utf8)
dpkg-reconfigure locales
# remove unused config file
rm -rf /etc/network/options /etc/environment
# migrate over to systemd (before the upgrade) / you might want reboot if you install systemd
@HumanG33k
HumanG33k / following.py
Created February 27, 2020 16:47 — forked from zedeus/following.py
Fetch Twitter following list
import requests, re, sys
url = "https://mobile.twitter.com/{}/following"
cursor = ""
usernames = []
first = True
if len(sys.argv) < 2:
print("Usage: python followers.py <username>")
quit(1)