Skip to content

Instantly share code, notes, and snippets.

View ansballard's full-sized avatar
:fishsticks:
nothing fishy going on here

Aaron Ballard ansballard

:fishsticks:
nothing fishy going on here
View GitHub Profile
@ansballard
ansballard / TSQL-to-POCO
Created April 17, 2020 19:57 — forked from joey-qc/TSQL-to-POCO
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR
alert();
// ...
const { writeFile } = require("fs");
const { join } = require("path");
module.exports = {
// ...
activate() {
atom.config.observe("packagename.SettingName", updateStylesheet);
return this.subscriptions = new CompositeDisposable();
}
#!/bin/sh
# https://trac.ffmpeg.org/wiki/Capture/Desktop
FILENAME=${1:-"screencast"}
FPS=${2:-"30"}
WIDTH=${3:-"1366"}
HEIGHT="768"
DIMENSIONS="${WIDTH}x${HEIGHT}"
MP4="$FILENAME.mp4"
@ansballard
ansballard / gif_from_cli_2.sh
Created March 7, 2017 05:09
Convert a video file to a gif with ffmpeg
FILENAME=${1:-"screencast"}
FPS=${2:-"30"}
WIDTH=${3:-"1366"}
PALETTE="/tmp/palette.png"
FILTERS="fps=$FPS,scale=$WIDTH:-1:flags=lanczos"
ffmpeg -v warning -i $FILENAME -vf "$FILTERS,palettegen" -y $PALETTE
ffmpeg -v warning -i $FILENAME -i $PALETTE -lavfi "$FILTERS [x]; [x][1:v] paletteuse" -y $FILENAME.gif
@ansballard
ansballard / gif_from_cli_1.sh
Created March 7, 2017 04:59
A script to record a portion of your screen with ffmpeg
#!/bin/sh
FILENAME=${1:-"screencast.mp4"}
FPS=${2:-"30"}
DIMENSIONS=${3:-"1366x768"}
printf "\n\033[0;35mRecording to $FILENAME, $FPS fps, $DIMENSIONS...\033[0m\n\n"
ffmpeg -v error -framerate $FPS -video_size $DIMENSIONS -f x11grab -i :0.0+0,0 -vcodec libx264 -crf 0 -preset ultrafast -acodec pcm_s16le $FILENAME
app.get("/", (req, res) => {
res.sendFile("index.html");
});
app.get("/u/:username", (req, res) => {
res.redirect("/#/u/" + req.params.username);
});
app.get("/userlist", (req, res) => {
res.redirect("/#userlist");
});
@ansballard
ansballard / apmpackages.md
Last active June 2, 2017 16:25
apmpackages

Packages (general)

  • emmet
  • linter
  • linter-eslint (npm install -g eslint)
  • language-postcss
  • minimap
  • atom-beautify
  • file-icons
  • local-history