Skip to content

Instantly share code, notes, and snippets.

View rowdyrotifer's full-sized avatar

Mai rowdyrotifer

  • San Francisco, CA
View GitHub Profile
@czj
czj / gist:1263872
Created October 5, 2011 07:39
Script to encode with HandbrakeCLI (x264) 720p, high image quality, low file size
#!/usr/bin/env ruby
# encoding: utf-8
# x264 presets guide : https://forum.handbrake.fr/viewtopic.php?f=6&t=19426
X264 = "b-adapt=2:rc-lookahead=50:me=umh:bframes=5:ref=6:direct=auto:trellis=2:subq=10:psy-rd=1.0,0.10:analyse=all"
FORMAT = "--optimize --format mp4"
QUALITY = "--ab 64 --mixdown mono --quality 23 -e x264 -x '#{X264}'"
SIZE = "--width 1280 --height 720"
ARGV.each do |param|
@iloveitaly
iloveitaly / graffle2hash.rb
Created December 16, 2011 18:34
Convert Hierarchical OmniGraffle Document to JSON
#!/usr/bin/env ruby
# rubycocoa
require 'osx/cocoa'
include OSX
OSX.require_framework 'ScriptingBridge'
class GraffleConverter
def initialize
@graffle = SBApplication.applicationWithBundleIdentifier_("com.omnigroup.OmniGraffle")
@spikegrobstein
spikegrobstein / nginx.conf
Last active August 9, 2024 13:42
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.
@Exadra37
Exadra37 / secure-phpmyadmin-installation.txt
Last active June 21, 2022 05:46
Secure PhpMyAdmin installation in 3 steps, by restrict access for specific users from specific ip addresses and change the alias name from phpmyadmin to other name less obvious.
/**
* - Securing PhpMyAdmin instalation in Ubuntu server
*
* @author Paulo Silva(Exadra37) <exadra37ingmailpointcom>
* @package Exadra37/SecurePhpMyAdmin
* @version 1.0.1
* @since 30/01/2014 - v.1.0.0
* 05/06/2014 - v.1.0.1
*
*/
@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active October 6, 2024 20:11
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@retlehs
retlehs / gist:e5683cb8377e1b1836ab
Created May 26, 2015 16:26
Don't be scared of Sage

This is from a comment on the Advanced WordPress Facebook group by Kevin Hoffman.


Disclaimer: I'm not affiliated with Roots, just a satisfied user.

In response to several recent questions on the topic of starter themes, the following are my thoughts on what I believe is the best starter theme available today, along with a heads-up on an upcoming resource that may help you in the near future.

Recommendations for starter themes come up quite often in AWP, and my first instinct is to recommend Roots' Sage starter theme (https://roots.io/sage/), but to be honest, it's not for everyone. I feel like I always have to attach the caveat concerning the prerequisites: Node.js, gulp, Bower, CSS preprocessing, build processes, etc. I often see advanced devs discouraging others from trying Sage if they're not 100% up to date on all of these tools. Don't let that scare you.

anonymous
anonymous / mackeeper_blocker.rb
Created December 11, 2015 21:22
#!/usr/bin/ruby
#Author: Vatsaev Aslan (@avatsaev)
#Repository: https://github.com/avatsaev/mackeeper_blocker
#request root previleges in order to modify hosts file
if ENV["USER"] != "root"
exec("sudo #{ENV['_']} #{ARGV.join(' ')}")
exit
end
@fbrinker
fbrinker / i3-display-swap.sh
Last active March 6, 2024 11:09
Swap i3 displays / workspaces between displays
#!/usr/bin/env bash
# requires jq
DISPLAY_CONFIG=($(i3-msg -t get_outputs | jq -r '.[]|"\(.name):\(.current_workspace)"'))
for ROW in "${DISPLAY_CONFIG[@]}"
do
IFS=':'
read -ra CONFIG <<< "${ROW}"
if [ "${CONFIG[0]}" != "null" ] && [ "${CONFIG[1]}" != "null" ]; then