Skip to content

Instantly share code, notes, and snippets.

View fsiler's full-sized avatar

Frank Siler fsiler

View GitHub Profile
@fsiler
fsiler / easternMO.gltf
Created February 10, 2024 18:38
Blender inset problem
This file has been truncated, but you can view the full file.
{
"asset": {
"version": "2.0",
"generator": "THREE.GLTFExporter"
},
"scenes": [
{
"nodes": [
1
]
@fsiler
fsiler / .vimrc
Created October 11, 2022 22:04
Vim Config
runtime! ftplugin/man.vim
"color darkblue
syntax on
set hls ic is scs si et ts=2 sts=2 sw=2 et sr wmnu ru sbr=BR: ls=2
match error /\s\+$\|\t\|TODO\|XXX\|BUG/
set stl+=\ %{\ line2byte(line(\"$\")+1)-1\ }B\ %F%R%M\ %l:%c
noremap :W :w
noremap :Q :q
@fsiler
fsiler / Command to bulk download (basic, slower)
Last active May 3, 2020 17:28
Notes for EMC productions mass mashups
youtube-dl "ytsearchall:#digitaldrumlineproject" --config-location $HOME/EMC/youtube-dl.config
@fsiler
fsiler / Smajda.md
Last active October 16, 2017 23:43
2017-10-14 Smajda

NOTE- this comes from Jon Smajda @smajda, who presented at PythonKC

My one cool Python trick from today:

When you're debugging some code, if you put this at the line you want to look at:

import pdb; pdb.set_trace()

You will be dropped into an interactive shell at that point in your code. For example:

@fsiler
fsiler / rc.py
Created August 20, 2017 22:43
Python rc stuff
#!/usr/bin/env python
from __future__ import division, generators, nested_scopes, with_statement
import atexit, os, readline, rlcompleter
readline.parse_and_bind("tab: complete")
readline.set_history_length(10000)
histfile = os.path.expanduser("~/.python/history")
try:
readline.read_history_file(histfile)
@fsiler
fsiler / rename
Last active July 19, 2016 19:04
classic Perl rename script with verbose, no-action, and updated to add undo file
#!/usr/bin/env perl -w
#
# This script was developed by Robin Barker (Robin.Barker@npl.co.uk),
# from Larry Wall's original script eg/rename from the perl source.
#
# This script is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
# 20160717 me@franksiler.com revised- added automatic UNDO script creation
# Revision 1.5 1998/12/18 16:16:31 rmb1 moved to perl/source changed man documentation to POD
#!/usr/bin/env python
from __future__ import division, generators, nested_scopes, print_function, with_statement
import os, readline, rlcompleter, atexit
readline.parse_and_bind("tab: complete")
readline.set_history_length(10000)
histfile = os.path.expanduser("~/.python/history")
try:
readline.read_history_file(histfile)
" .vimrc by Franklin M. Siler <fms@silerfamily.net>
" authored since april 2003 or so
set nocompatible
set encoding=utf-8
set modeline
source $VIMRUNTIME/ftplugin/man.vim
":au Filetype html,xml,xsl,php source ~/.vim/scripts/closetag.vim
:au FileType html,xhtml,xml,php,xsl so ~/.vim/ftplugin/html_autoclosetag.vim
let @a="0iln -sfT Jj"
@fsiler
fsiler / buckflickr.py
Created May 24, 2012 13:23
Buckflickr: a script to rip Flickr galleries given an image URL
#!/usr/bin/env python
# named in honor of Jack Buck: "Go crazy, folks! Go crazy!"
# yes, this is ugly. No, it doesn't use the API. I don't care. I want my pictures quickly without fuss.
#
# see http://goo.gl/yJVl5 for PyCon inspiration video
#
# TODO: handle flickr login
# TODO: add command line options for username, password
# TODO: make at least "tocrawled" persistent, perhaps database, maybe even by pickling
# TODO: add some kind of metadata so it's easy to re-crawl things later as galleries get updated