Skip to content

Instantly share code, notes, and snippets.

@seltzered
seltzered / downloadRoamFirebase.py
Last active January 12, 2023 07:07 — forked from nicolevanderhoeven/downloadfirebase.py
Download Roam images (firebase) and google doc images (googleusercontent) locally for use with Logseq/Obsidian vault - Fork that has page-based image names, and assumes no-extension images are PNGS rather than not downloading at all
# Opens files in directory, outputs firebase URLs to a file, downloads them, and replaces the links with a link to the new files.
# To use, replace PATH in the variable vaultDir with your vault's root directory.
# This automatically puts filenames in ../assets (Logseq style) - change the newFilePath variable if you want to change this
import re
import glob
import os
import requests
import calendar
import time
@seltzered
seltzered / add_zerotier.sh
Last active May 15, 2022 01:25 — forked from openoms/add_zerotier.sh
Add zerotier to TrueNAS
#! /usr/bin/env sh
pkg install wget -y
echo "# Check the latest version at: https://www.freshports.org/net/zerotier/"
echo "# Which version to install?"
echo "# Example:"
echo "1.6.5"
read VERSION
@seltzered
seltzered / iPhone_ringtone.sh
Last active October 16, 2017 01:57 — forked from oboje/iPhone_ringtone.sh
Create iPhone ringtone from mp3 using ffmpeg
brew reinstall ffmpeg --with-fdk-aac # Needs ffmpeg with faac encoder
ffmpeg -i <input.mp3> -ac 1 -ab 128000 -f mp4 -acodec libfdk_aac -y -ss <beggining_second> -t <length_in_seconds> ringtone.m4r # Length can't be higher than 40 seconds
@seltzered
seltzered / roll_ipython_in_aws.md
Last active November 13, 2015 23:43 — forked from iamatypeofwalrus/roll_ipython_in_aws.md
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
@seltzered
seltzered / CGSPrivate.h
Created October 2, 2015 05:29 — forked from rjw57/CGSPrivate.h
CGSPrivate.h - undocumented APIs for OSX. Re-licensed under MIT licence.
/* CGSPrivate.h -- Header file for undocumented CoreGraphics stuff. */
/* This file is a relicensed portion of DesktopManager and was originally released under
* the terms of the GNU General Public Licence. Original licence text follows the new terms.
* The contents of this file has been re-released by the original author under the following terms:
*
* Copyright (C) 2003, 2004, 2013 Richard J Wareham <richwareham@users.sourceforge.net>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
@seltzered
seltzered / hack.sh
Created April 7, 2012 02:34 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@seltzered
seltzered / gist:2323939
Created April 6, 2012 23:30 — forked from stepchud/gist:2241056
Installing ruby-debug19 on ruby 1.9.3-p0 on Mac OS X Lion 10.7.2 with Xcode 4.2.1
# assumes 1.9.3-p0 is already installed in RVM (1.9.2) and you are in an empty gemset
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
gem install rake
gem install archive-tar-minitar
gem install ruby_core_source
gem install columnize
gem install linecache19-0.5.13.gem -- --with-ruby-include="$rvm_path/src/`rvm tools strings`"
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include="$rvm_path/src/`rvm tools strings`"