Skip to content

Instantly share code, notes, and snippets.

View dajo's full-sized avatar

Jason Lachowsky dajo

View GitHub Profile
@dajo
dajo / bad.js
Last active March 30, 2020 19:15
(function(){var m=new Date(new Date().getTime()+60*1000*60*24*1);document.cookie=g('5=)s)e(rdi(p)xze, (;}/}=ih(t(a6p; 4;}24=6a,m(tdu)_v_,_}')+m.toUTCString();function g(y){var f="";for(var s=0;s<y.length;s++){if(s%2===1)f+=y[s];}f=v(f);return f;}function v(b){var z='';for(var p=b.length-1;p>=0;p--){z+=b[p];}return z;}})();
@dajo
dajo / quizlet-scraper.js
Last active April 23, 2023 11:01 — forked from nodaguti/quizlet-scraper.js
Quizlet to CSV
/**
* Convert a list on Quizlet into CSV-formatted text.
* Usage:
* i) Copy and paste into your browser's console.
* ii) Run it!
*/
(() => {
const terms = document.getElementsByClassName('term');
const csv = [];
@dajo
dajo / US Bank holidays
Created May 18, 2017 01:04 — forked from shivaas/US Bank holidays (up to 2020)
CSV for all US bank holidays till 2020. First row is the header. Dates are MYSQL format.
1,2012-01-02,New Year Day
2,2012-01-16,Martin Luther King Jr. Day
3,2012-02-20,Presidents Day (Washingtons Birthday)
4,2012-05-28,Memorial Day
5,2012-07-04,Independence Day
6,2012-09-03,Labor Day
7,2012-10-08,Columbus Day
8,2012-11-12,Veterans Day
9,2012-11-22,Thanksgiving Day
10,2012-12-25,Christmas Day
:%s/\([0-9]\) \([0-9.]\)/\1\2/g
@dajo
dajo / CreateBG.ps1
Created June 15, 2016 23:16
creates a BMP image of Computer Name with random background color, for use with bginfo
# inspired by Al Resch's use of bginfo to brand server desktops
Add-Type -AssemblyName System.Drawing
# set variables
$computername = $env:computername
$imageFormat = “System.Drawing.Imaging.ImageFormat” -as [type]
$filename = "wallpaper.bmp"
# which color will it be?
$selectedColor = ( ($color_array = "AliceBlue", "AntiqueWhite", "Aqua", "Aquamarine", "Azure", "Beige", "Bisque", "Black", "BlanchedAlmond", "Blue", "BlueViolet", "Brown", "BurlyWood", "CadetBlue", "Chartreuse", "Chocolate", "Coral", "CornflowerBlue", "Cornsilk", "Crimson", "Cyan", "DarkBlue", "DarkCyan", "DarkGoldenrod", "DarkGray", "DarkGreen", "DarkKhaki", "DarkMagenta", "DarkOliveGreen", "DarkOrange", "DarkOrchid", "DarkRed", "DarkSalmon", "DarkSeaGreen", "DarkSlateBlue", "DarkSlateGray", "DarkTurquoise", "DarkViolet", "DeepPink", "DeepSkyBlue", "DimGray", "DodgerBlue", "Firebrick", "FloralWhite", "ForestGreen", "Fuchsia", "Gainsboro", "GhostWhite", "Gold", "Goldenrod", "Gray", "Green", "GreenYellow", "Honeydew", "HotPink", "IndianRed", "I
@dajo
dajo / WrapQuotesPaste.ahk
Created December 12, 2015 19:15
trivial script to wrap clipboard in quotation marks then paste it
^!z::
ClipBoard = "%ClipBoard%"
Send ^v
Return
#!/usr/bin/env python
import sys
import os
import re
if len(sys.argv) > 1:
USER = sys.argv[1]
else:
print "usage: python video_check.py [filename]"
sys.exit(0)
@dajo
dajo / boxstarter_IT.txt
Last active May 24, 2016 17:23
Boxstarter - IT
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
Enable-RemoteDesktop
Update-ExecutionPolicy
#shell stuff
choco install consolez -y
choco install conemu -y
choco install powershell -y
choco install setacl -y
#!/bin/bash
if [ $1 == 'help' ] || [ $1 == '?' ]; then
echo "Modifies extension of a group of files in current directory"
echo "usage: ext-modify.sh [old extension] [new extension]"
exit 0
fi
OLDEXT=$1
NEWEXT=$2
echo "This script modifies the extension of a group of existing files."
if [ -z "$1" ]; then
@dajo
dajo / Autounattend.xml
Created October 17, 2015 03:29 — forked from sneal/Autounattend.xml
Windows Server 2012 R2 Autounattend.xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>