Skip to content

Instantly share code, notes, and snippets.

@L33tCh
L33tCh / ColumnSearch.sql
Created February 14, 2023 17:31
MS SQL Column Search Script
SELECT c.name AS 'ColumnName'
, t.name AS 'TableName'
FROM AutoCRM.sys.columns c
JOIN AutoCRM.sys.tables t
ON c.object_id = t.object_id
WHERE c.name LIKE '%example%'
ORDER BY TableName
, ColumnName;
@L33tCh
L33tCh / Facebook Book Scraper.user.js
Last active November 28, 2019 06:49
Get a JSON list of your read books off Facebook!
// ==UserScript==
// @name Facebook Book Scraper
// @namespace http://l33tch.net/
// @version 1.1
// @description Get a list of your books off Facebook!
// @author L33tCh
// @match https://*.facebook.com/*/books*
// @grant none
// ==/UserScript==
@L33tCh
L33tCh / getlog
Created September 4, 2018 09:10
Changelog Generator
#!/bin/bash
# Generates changelog day by day
# Can also filter by user
user=$1
echo "CHANGELOG"
echo ----------------------
git log --no-merges --author=$user --format="%cd for %an" --date=short | sort -u -r | while read DATE ; do
echo
echo [$DATE]
GIT_PAGER=cat git log --author=$user --no-merges --format="%s" --since="$DATE 00:00" --until="$DATE 23:59"
@L33tCh
L33tCh / speedtest2api
Last active August 25, 2018 20:54 — forked from linosteenkamp/speedtest2api.sh
Execute speedtest-cli and write results to speedtest-api
#!/bin/bash
# URL for speedtest-api (Change this to match your setup)
URL="localhost:3000/api/test/create"
# Path to speedtest-cli (Change this to match the path to your speedtest-cli executable)
SPEEDTEST_CLI_PATH="/usr/bin/speedtest-cli"
# Input Field Seperator for splitting the CSV result into an array
IFS=","
@L33tCh
L33tCh / IFTTT Time Logger
Last active November 7, 2016 12:59
IFTTT - L33tCh's Time Logger
Log time when entering and exiting an area. This includes tracking hours with multiple clients and travel times. Use this Sheets template: http://bit.ly/2dfsF4k
.
Just update the location to match where you wish to track and the text "Client" in the formatted row section. Feel free to add as many iterations of this Applet for how ever many clients you have.
Until IFTTT allow me to publish, you will have to replace the the "Track your work hours" Do Applet with the detail below and update the first few formatted cells by copying everything within square brackets here:
[ {{OccurredAt}} ||| Manual ||| {{LocationMapURL}} ||| =IF(ISODD(ROW()), "exited", "entered") ]
and replace the formatted row left of " ||| =DATEVALUE(... " with the copy.
@L33tCh
L33tCh / 0_reuse_code.js
Last active August 29, 2015 14:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console