Skip to content

Instantly share code, notes, and snippets.

View digitalnomad91's full-sized avatar
🌏
Hack the world

Andrew Corbin digitalnomad91

🌏
Hack the world
View GitHub Profile
@digitalnomad91
digitalnomad91 / jq-cheetsheet.md
Created May 26, 2023 22:46 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

import os
import pickle
import warnings
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from tensorflow.keras.callbacks import EarlyStopping
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Dropout
@LAKostis
LAKostis / spf.py
Last active October 1, 2022 03:49 — forked from moloch--/spf.py
Check SPF records for expired Domains and DNS lookup depth
#!/usr/bin/env python3
# modified version of this snippet
# https://gist.github.com/TheRook/95f2b872bdc81bac2371
import dns.resolver
import dns.name
from urllib.parse import urlparse
function importAll(r) {
return r.keys().map(r);
}
const images = importAll(require.context('../assets/logos', false, /\.(png|jpe?g|svg)$/));
const companies = images.map(item => {
return {
logo: item.default,
slug: 'company-page',
@loilo
loilo / magic-methods.js
Last active June 15, 2024 07:36
PHP Magic Methods in JavaScript
function magicMethods (clazz) {
// A toggle switch for the __isset method
// Needed to control "prop in instance" inside of getters
let issetEnabled = true
const classHandler = Object.create(null)
// Trap for class instantiation
classHandler.construct = (target, args, receiver) => {
// Wrapped class instance
@sormy
sormy / libtorrent-sequential-download.patch
Created October 24, 2017 04:45
rtorrent/libtorrent sequential download patch
diff --git a/src/download/chunk_selector.cc b/src/download/chunk_selector.cc
index 850fec0f..248a29f9 100644
--- a/src/download/chunk_selector.cc
+++ b/src/download/chunk_selector.cc
@@ -82,7 +82,7 @@ ChunkSelector::update_priorities() {
m_sharedQueue.clear();
if (m_position == invalid_chunk)
- m_position = random() % size();
+ m_position = 0;
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Models\Main\Admin;
use Facades\PragmaRX\Google2FA\Google2FA;
use Illuminate\Http\Request;
class TokenController extends Controller
@olih
olih / jq-cheetsheet.md
Last active July 16, 2024 23:02
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@SaptakS
SaptakS / domain-age.php
Created January 20, 2016 08:48
PHP code to find Domain Age of a domain
<?php
$domain = $_GET['domain'];
$w = new DomainAge();
echo $w->age($domain);
class DomainAge
{
private $WHOIS_SERVERS = array(
"com" => array("whois.verisign-grs.com", "/Creation Date:(.*)/"),
"net" => array("whois.verisign-grs.com", "/Creation Date:(.*)/"),
@haasn
haasn / about:config.md
Last active April 2, 2024 18:46
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.