Skip to content

Instantly share code, notes, and snippets.

@farfromunique
farfromunique / get_table_definition.sql
Created August 19, 2022 08:39
updated and cleaner version of awslabs/amazon-redshift-utils src/AdminViews/v_generate_tbl_ddl.sql
/* This is designed to be run in Python, with the {} vars below templated in. */
WITH vars AS (
SELECT
'{schema}' AS schemaname,
'{table}' AS tablename
),
base_info AS (
SELECT
cls.oid AS table_id,
@farfromunique
farfromunique / all_aws_lambda_modules_python.md
Last active August 17, 2021 08:06 — forked from gene1wood/all_aws_lambda_modules_python.md
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Futhark Power Generator v1.7beta</title>
@farfromunique
farfromunique / MediaCube.ini
Created April 14, 2019 13:16
MatrixTransform issues
[Rainmeter]
Update=1000
@include=Icons.inc
[MeasureMedia]
Measure=NowPlaying
PlayerName=Spotify
PlayerType=STATUS
IfAboveValue=0
IfAboveAction=[!SetOption TopIcon MeasureName "TopIconPlayPause"][!CommandMeasure "MeasureMediaKey" "PlayPause"][!UpdateMeter TopIcon][!Redraw]
@farfromunique
farfromunique / FileClassReflection.php
Created July 4, 2018 20:35
a messy script to generate project tests.
<?php
declare(strict_types=1);
use Symfony\Component\Finder\SplFileInfo as SfFileInfo;
class FileClassReflection extends ReflectionClass
{
private $fileInfo;
@farfromunique
farfromunique / WordApiTest.php
Created October 22, 2017 17:28
PHPUnit with a line break - Test
<?php
namespace wordnik\tests;
require_once __DIR__ . '/../vendor/autoload.php';
date_default_timezone_set('America/Los_Angeles');
class WordApiTest extends BaseApiTest {
public function setUp() {
@farfromunique
farfromunique / fiddle.response.html
Created September 21, 2017 23:40
sample response data
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="page-header">
<h1 id="header" class="text-center">ACWPD Random Password Generator</h1>
</div>
<p>
This tool will generate a password for you using <a href="https://www.random.org/">Random.Org's</a> true random numbers. While the password is not guarenteed to be unique, there is a high probability that it is. It's also not something that can be guessed, as it's random.
</p>
<p>
@farfromunique
farfromunique / arrowExplained.php
Created February 13, 2017 03:02
a description of how PHP uses the -> operator
<?php
/* Here is some arbitrary code. Note that this is outside the Class definition */
$var = 'Some value';
function doStuff($param) {
echo 'Doing stuff with ' . $param . '!';
}
@farfromunique
farfromunique / shrug.ahk
Last active February 12, 2018 15:56 — forked from dieseltravis/shrug.ahk
autohotkey script to replace 🤷 with ¯\_(ツ)_/¯ (and a few other common unicode art emoji)
; :shrug: ¯\_(ツ)_/¯ but using unicode character strings instead of literal characters, for use in programs like Skype for Business.
:B0:`:shrug::
if (A_EndChar == ":") {
SendInput, {BS 7}{U+00AF}\_({U+30C4})_/{U+00AF}
}
return
; :whatever: ◔_◔
:B0:`:whatever::
@farfromunique
farfromunique / form.html
Created May 18, 2014 23:11
FillableForm
<html>
<head>
<meta charset="UTF-8">
<style media="screen" type="text/css">
// This is typically an external file that I may not use all of on this page.
/* Basic elements */
div {
position: relative;
}