Moved to skeeto/scratch/aidrivers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ | |
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ | |
╞══════════════════════════════════════════════════════════════════════════════╡ | |
│ Copyright 2020 Justine Alexandra Roberts Tunney │ | |
│ │ | |
│ Permission to use, copy, modify, and/or distribute this software for │ | |
│ any purpose with or without fee is hereby granted, provided that the │ | |
│ above copyright notice and this permission notice appear in all copies. │ | |
│ │ | |
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │ |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The author disclaims copyright to this source code. | |
-- Convert http://redd.it/3bxlg7 to an SQLite database | |
-- Convert the whole dataset at once like so: | |
-- find reddit_data -type f -exec time lua json2sqlite.lua {} \; | |
local cjson = require"cjson" | |
local sqlite = require"lsqlite3" | |
local db = sqlite.open("reddit_data.db") | |
db:exec[[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/ | |
### | |
# Label definitions | |
### | |
declare -A LABELS | |
# Platform |
Since this is on Hacker News and reddit...
- No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is a good bit crazier.
- I apologize for the use of
_t
in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries". - Since people kept complaining, I've fixed the assignments of string literals to non-const
char *
s. - My use of
type * name
, however, is entirely intentional. - If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at le
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Widget < ActiveRecord::Base | |
# | |
# ..... extra crap here ..... | |
# | |
scope :active, where(:status => [:active]) | |
# | |
# This will fuzzy search the model for the provided query. It will split your |
NewerOlder