Skip to content

Instantly share code, notes, and snippets.

View djeraseit's full-sized avatar
🎯
Focusing

Theodis Butler djeraseit

🎯
Focusing
View GitHub Profile
#cloud-config
write_files:
- path: /home/core/journal2logentries.sh
permissions: '0744'
owner: root:root
content: |
#!/usr/bin/env bash
# CoreOS on Google Compute Engine: push systemd journal logs to logentries.com
# get your private token from logentries.com, see https://logentries.com/doc/input-token
@geschke
geschke / gdrive-example.php
Created April 21, 2014 17:15
Google Drive PHP API library example to download a spreadsheet file
<?php
require_once __DIR__ . '/vendor/autoload.php';
class DriveFile
{
private $service = null;
private $client = null;
private $auth;
@ZEROF
ZEROF / hiawatha.sh
Last active August 20, 2020 12:38
Hiawatha web server install script (Hiawatha,PHP-FPM,MariaDB)
#!/bin/bash
# This script will help you to set Hiawatha Server.
# Tested on Devuan 8 32/64bit. Debian Jessie supported as well.
# Script author ZEROF <zerof at backbox dot org>
# If you like Linux and security join http://backbox.org
# Script version 0.6c
# This script is distributed under a DO WHAT THE F*** YOU WANT TO PUBLIC LICENSE.
# http://www.wtfpl.net/txt/copying/
clear
function banner ()
@aguillard
aguillard / linkedin.php
Created April 14, 2014 21:34
LinkedIn Resume
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, "fr_FR.utf8");
// Fill the keys and secrets you retrieved after registering your app
$oauth = new OAuth("__API_KEY__", "__API_SECRET__");
$oauth->setToken("__USER_TOKEN__", "__USER_SECRET__");
@rajivseelam
rajivseelam / A.README
Last active June 7, 2017 06:15
Create Google Alert and grab the feed.
Google alerts is a way to manage your content by subscribing to keywords. Here is an example on how to make that google alert with php.
Get the feed url and parse the feed. There won't be any feed available as soon the alert is created.
-------------------------------------
Copy composer.json and do composer update.
Add this to providers
@msmuenchen
msmuenchen / gist:9318327
Last active April 20, 2025 09:32
KeePass v2.x (KDBX v3.x) file format
Convention: Byte array notation as it would appear in a hexeditor.
= Layout=
KDBX files, the keepass database files, are layout as follows:
1) Bytes 0-3: Primary identifier, common across all kdbx versions:
private static $sigByte1=[0x03,0xD9,0xA2,0x9A];
2) Bytes 4-7: Secondary identifier. Byte 4 can be used to identify the file version (0x67 is latest, 0x66 is the KeePass 2 pre-release format and 0x55 is KeePass 1)
@waldoj
waldoj / scc_subscribers.md
Last active April 19, 2016 06:27
Virginia State Corporation Commission database subscribers.

The Virginia State Corporation Commission (SCC) charges for bulk data of corporate registrations—$150/month for weekly updates, with a minimum three-month contract. I asked them for a list of their customers for this service. They are as follows:

Dun & Bradstreet
899 Eaton Ave.
Bethlehem, PA 18025

Seisint, Inc. (LexisNexis)
6601 Park of Commerce Blvd.
Boca Raton, FL 33487

@ranacseruet
ranacseruet / gist:8412771
Created January 14, 2014 03:50
Benchmark for arrayaccess vs object access for PHP classes
//test.class.php
<?php
class Test implements ArrayAccess
{
private $data = array();
public function __set($key, $value){
$this->data[$key] = $value;
}
@zachflower
zachflower / tor.php
Last active December 28, 2015 20:29
Tor Page Crawler
<?php
/**
* Tor Page Crawler
*
* Download web pages anonymously using the Tor network.
* Usage Example:
* $tor = new Tor();
*
* $tor->setUrl('http://zacharyflower.com');
@robinsmidsrod
robinsmidsrod / etc_clamav_clamd.conf
Last active December 27, 2015 20:49
Postfix/DSPAM/ClamAV/Dovecot with MySQL mail server setup (all encrypted with SSL/TLS)
#Automatically Generated by clamav-base postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-base
#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
TCPSocket 3310
TCPAddr 127.0.0.1
# TemporaryDirectory is not set to its default /tmp here to make overriding
# the default with environment variables TMPDIR/TMP/TEMP possible
User clamav
AllowSupplementaryGroups true
ScanMail true