Skip to content

Instantly share code, notes, and snippets.

View Beej126's full-sized avatar

Beej Beej126

View GitHub Profile
(function() { var f;function g(b){function c(c){var e=b;if(c)for(var h=0;h<c.length;h++)e=e.replace("$"+(h+1),c[h]);return e}c.toString=function(){k.error("Attempt to treat enum as string:",b);return""};return c}
var m=m?m:{},aa=g("Pandora One - Listen to Pandora with No Ads, Higher Quality Audio, and More"),ba=g("Pandora Radio - Listen to Free Internet Radio, Find New Music"),ca=g("Could not create your account at this time. Please try again later."),da=g("Invalid email."),ea=g("An account already exists with that email address."),fa=g("Your password should be at least 6 characters."),ha=g("Your password may contain only letters, numbers, and punctuation."),ia=g("The provided password was incorrect. Please re-enter your password."),
ja=g("Please enter a valid birth year."),ka=g("Please enter a valid birth day."),la=g("Please provide month and day of your birth."),ma=g("We're sorry, you must be at least 13 years old to register."),na=g("Invalid ZIP code"),oa=g("Invalid postal code"),qa=g("You must agree to th
(function (main, modules) {
'use strict';
var cache = {};
var wd = function (c) {
return c.split(/\//).slice(0, -1).join('/');
};
window.process = {
cwd: function () {
return wd(location.pathname) || '/';
}
#r "SqlClientHelpers.dll" // download from here: https://github.com/Beej126/SqlClientHelpers/releases/download/1.0/SqlClientHelpers.dll
using System;
using System.Net;
using System.Data;
using static System.Console;
SqlClientHelpers.Proc.DefaultConnectionString = "xxx";
var proc = new SqlClientHelpers.Proc("SpreaderDataLookup_p");
var update = new SqlClientHelpers.Proc("dbo.SpreaderData_Table_u");
var client = new WebClient();
@Beej126
Beej126 / !genFaPng.ps1
Last active September 11, 2017 14:51
# ____
# / __ \________ ________ ____ ______
# / /_/ / ___/ _ \/ ___/ _ \/ __ `/ ___/
# / ____/ / / __/ / / __/ /_/ (__ )
#/_/ /_/ \___/_/ \___/\__, /____/
# /_/
# this script will automatically pull font awesome files from github via .net framework "WebClient"
# install fantastically handy ImageMagick tool from => http://www.imagemagick.org/script/binary-releases.php
# and add it to your path
if (-not [bool](Get-Command "magick.exe" -ErrorAction SilentlyContinue)) { throw "Magick.exe not in path" }
@Beej126
Beej126 / feed.json
Last active November 21, 2016 18:44
Movie Mashup
{
"status": "ok",
"status_message": "Query was successful",
"data": {
"movie_count": 5839,
"limit": 20,
"page_number": 1,
"movies": [
{
"id": 6182,
@Beej126
Beej126 / PDFScrape.csx
Last active May 20, 2021 09:42
Tesseract OCR on inbound PDF implemented in .Net, structured as an HTTP request Azure Function, uploads results to SQL Server
#r "iTextSharp.dll"
#r "Ghostscript.Net.dll"
#r "System.Drawing"
#r "Tesseract.dll"
#r "SqlClientHelpers.dll"
#r "iTextSharp.Licensekey.dll"
#r "System.Data"
#r "System.Configuration"
using System;
@Beej126
Beej126 / catalog.csx
Last active January 18, 2017 05:43
generate html page to catalog nested folders
#r "MarkdownSharp.dll"
using MarkdownSharp;
using System.Text.RegularExpressions;
using System.Text;
using System.Collections.Generic;
///////////////// SETTINGS ///////////////////////////////
var cliArgs = Environment.GetCommandLineArgs();
//base command line looks like below, "--" indicates command line args
@Beej126
Beej126 / WPHTML2MD.csx
Created February 14, 2017 18:24
Convert WordPress Post HTML to Markdown (by Post Id)
#r "MySql.Data"
#r "Html2Markdown"
#r "NPoco"
//#r "ReverseMarkdown" //this one turned <li> into "-" vs "*"
//install these libs via scriptcs -install libname
using NPoco;
public class Post {
public double id {get; private set;}
@Beej126
Beej126 / README.md
Last active April 18, 2022 15:41
Scripted Windows 10 "Win+X" Menu (aka "Power User Menu")
@Beej126
Beej126 / .bash_profile
Created July 8, 2017 06:19
Mac favorite .bash_profile, aliases etc.
e(){
open $1 -a TextWrangler
}
alias ls=ls\ -alGFh
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx