Skip to content

Instantly share code, notes, and snippets.

View ss44's full-sized avatar

SSingh ss44

  • Toronto, Ontario, Canada
View GitHub Profile
@ss44
ss44 / Srt2TextPlus.lua
Last active July 27, 2023 04:28
WIP Lua Script for Davinci Resolve to convert Subtitles (SRT) tracks to Text+ media comps.
--[[
SRT to Text+
Author Shinda Singh <ss@ss44.ca>
This is a Davinci Resolve Script or at least an attempt at one
that reads text from a subtitle track and converts them to text+ comps so that
effects can be applied (think Mr Best Subtitles)
Unfortunately this is kind of stalled since it only creates the text+ with text
@ss44
ss44 / gist:909a3dbdf37fd1b94b77e1cf81fcba51
Created July 15, 2023 23:16
Bash Function To Ping Discord
#!/bin/bash
# The following ought to be added to any of the auto loaded bash files ~/.bash_profile or ~/.bash_aliases etc.
ping_discord ()
{
local strDiscordWebhookUrl=<replace with your webhook_url>
local strMessage="$@";
@ss44
ss44 / FBGroupMemberRemover.js
Last active March 19, 2018 03:03 — forked from poteto/FBGroupMemberRemover.js
Delete everyone from your Facebook group! Thanks for the dark UX, FB
class FBGroupMemberRemover {
constructor() {
this.adminText = 'Admin';
this.removeMemberModalHeadingText = 'Remove Member';
this.memberElementSelector = '[data-name="GroupProfileGridItem"]';
this.memberContextMenuSelector = 'button[aria-label="Member Settings"]';
this.removeMemberButtonSelector = 'a[data-testid="leave_group"]'
this.removalOptions = {
@ss44
ss44 / pre-commit.sh
Created August 23, 2016 20:24 — forked from alexbevi/pre-commit.sh
Git pre-commit hook that checks ruby source files for Pry breakpoints
# Git pre-commit hook to check all staged Ruby (*.rb/haml/coffee) files
# for Pry binding references
#
# Installation
#
# ln -s /path/to/pre-commit.sh /path/to/project/.git/hooks/pre-commit
#
# Based on
#
# http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/
@ss44
ss44 / file
Created August 14, 2016 15:40
quick file rename into sequential order
rename 's/\d+/sprintf("%05d",$&)/e' foo*
@ss44
ss44 / rails.rb
Created August 9, 2016 13:49
Use SSL in Rails development. First: to create a local SSL certificate and start a SSL webserver checkout *shell.sh*. Second: to configure Rails checkout *rails.rb*
# To enable SSL in Rails you could now simply use *force_ssl* in your
# ApplicationController but there is two more things to think about:
# In development our SSL webserver is running on port 3001 so we would
# actually need to use *force_ssl port: 3001* but then this wouldn't
# work for production.
# Also there is a good chance you might not always want to use SSL in development
# so it would be nice if we could just enable or disable SSL in the config.
# To make all this work first copy the file *ssl_with_configured_port.rb* to
# your *lib* directory. Second to enable SSL add *config.use_ssl = true*
ffmpeg -loop 1 -i image.jpg -i audio.mp3 -shortest -c:v mpeg4 -c:a copy 053.mp4
@ss44
ss44 / Common Punjabi Surnames
Last active November 16, 2023 11:01
List of Punjabi Surnames
Abusaria
Achara
Agah
Agre
Ahlawat
Ahluwalia
Ahuja
Ahuja
Ajmeria
Anaadi
@ss44
ss44 / vagrant-auto-plugins
Created February 5, 2015 16:13
Automatically install required vagrant plugins from within a vagrant script, as opposed to requiring users first install the needed plugins first. Not sure if this will cause any other issues but it does streamline the entire vagrant process.
required_plugins = %w( vagrant-hostsupdater vagrant-vbguest )
_retry = false
required_plugins.each do |plugin|
unless Vagrant.has_plugin? plugin
system "vagrant plugin install #{plugin}"
_retry = true
end
end
#!/bin/bash
## CGminer script for R9280X-DC2T-3GD5
## Does about
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
screen -mdS 'miner_script1' \
cgminer \
--scrypt \
--scan-time 1 \