Skip to content

Instantly share code, notes, and snippets.

@timelf123
timelf123 / user.boxstarter.ps1
Last active Sep 13, 2022 — forked from asford/tyger.boxstarter.ps1
Winget Boxstarter Developer
View user.boxstarter.ps1
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
# OR
# Install-BoxstarterPackage -PackageName <URL-TO-RAW-GIST> -DisableReboots
#
@timelf123
timelf123 / pvenode-rename
Created Jun 9, 2020 — forked from pierew/pvenode-rename
Changing a Proxmox VE Nodes name when it is not in a cluster
View pvenode-rename
OLDNAME=$(hostname)
hostnamectl set-hostname ${1}
mkdir -p /etc/pve/nodes/${1}
cp -a /etc/pve/nodes/${OLDNAME} /etc/pve/nodes/${1}
echo 'A reboot is required, Exit with CTRL-C'
read
@timelf123
timelf123 / gcp-gpu-vm-hashcat.md
Created Dec 9, 2019 — forked from koenrh/gcp-gpu-vm-hashcat.md
Running Hashcat on Google Cloud's new GPU-based VMs
View gcp-gpu-vm-hashcat.md

Running Hashcat on Google Cloud's GPU-based VMs

In February 2017, Google announced the availability GPU-based VMs. I spun up a few of these instances, and ran some benchmarks. Along the way, I wrote down the steps taken to provision these VM instances, and install relevant drivers.

Update April 2019: Updated instructions to use instances with the Tesla T4 GPUs.

View apistore.js
// APIStoreProps are properties that need to be
// ignored when running APIStore.makeStore()
const APIStoreProps = ['use', 'classes', 'constructor', 'init', 'state']
// getMethods returns methods defined
// in a given class' prototype, except init and constructor
const getMethods = (cls) => {
return Object.getOwnPropertyNames(cls.prototype)
.reduce((obj, prop) => {
@timelf123
timelf123 / cloudflare-workers-apilityio.js
Created Oct 17, 2019 — forked from diegoparrilla/cloudflare-workers-apilityio.js
Using Cloudflare Workers and https://Apility.io API add to the request headers information of the blacklists of abusers that contains the IP address of the client.
View cloudflare-workers-apilityio.js
addEventListener('fetch', event => {
event.respondWith(fetchAndCheckOrigin(event.request))
})
async function fetchAndCheckOrigin(req) {
try {
startTime = new Date();
const body = await req.body;
const ip = req.headers.get('cf-connecting-ip');
const es = req.headers.get('cf-ipcountry');
View ADFS Notes
Below are some notes for grabbing a list of domain users and other information via ADFS using acquired credentials.
Install Apps
Download and install visual studio 10
Downoad and install the Lync SDK
https://www.microsoft.com/en-us/download/details.aspx?id=36824 (deprecated)
http://go.microsoft.com/fwlink/?LinkID=248583
View hubspot-meetings-conversion-tracking.js
function isHubspotUrl(url) {
var hubspotUrls = [
'https://local.hubspot.com',
'https://app.hubspotqa.com',
'https://app.hubspot.com',
'https://meetings.hubspot.com'
];
return hubspotUrls.indexOf(url) > -1
}
View get-proxy-details.js
// identifier(s) should be in the following format:
// {
// resultName: 'name of key that will be used in the returned object',
// identifier: 'identifier that will be searched for in the format'
// }
function breakDown(string, format, identifiers){
for(let i = 0; i < identifiers.length; i++){
const identifier = identifiers[i];
identifier.index = format.indexOf(identifier.identifier);
}
@timelf123
timelf123 / proxy-install.sh
Created Oct 4, 2018 — forked from samjmck/proxy-install.sh
Squid auto-install + configure to anonymous proxy
View proxy-install.sh
#!/bin/bash
squiddir='/etc/squid/'
lib='/usr/lib/squid/'
conf="${squiddir}squid.conf"
clients=()
authusers=()
passwd=()
sudo apt-get -y install apache2-utils
sudo apt-get -y install squid
sudo /etc/init.d/squid stop
@timelf123
timelf123 / adidas-size-code-calculator.js
Created Oct 4, 2018 — forked from samjmck/adidas-size-code-calculator.js
Calculate the an adidas size code by using real life sizes from different regions
View adidas-size-code-calculator.js
function calculateSizeCode(size, type){
switch(type){
case 'USM':
return size * 20 + 530 - 80;
break;
case 'USF':
return size * 20 + 530 - 100;
break;
case 'UK':
return size * 20 + 530 - 70;