Skip to content

Instantly share code, notes, and snippets.

View rip747's full-sized avatar

Anthony Petruzzi rip747

View GitHub Profile
@rip747
rip747 / Remove videos from Youtube Watch Later playlist.md
Last active August 26, 2023 20:41 — forked from astamicu/Remove videos from Youtube Watch Later playlist.md
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];
    
 if (video === undefined) {
@rip747
rip747 / Rails Setup.txt
Created October 17, 2020 13:33 — forked from Deanout/Rails Setup.txt
Ruby on Rails 6 Setup Ubuntu 18.04
Commands from http://howtoforge.com/tutorial/ubuntu-ruby-on-rails
Yarn from https://linuxize.com/post/how-to-install-yarn-on-ubuntu-18-04/
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable --ruby
Restart terminal
@rip747
rip747 / Other resources
Last active March 16, 2019 16:36
Rails on Windows: My Notes
Multiple Databases with Rails
https://www.thegreatcodeadventure.com/managing-multiple-databases-in-a-single-rails-application/
Using GUID's As Primary Keys
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Using-GUID's-As-Primary-Keys
@rip747
rip747 / web.config
Created March 16, 2019 15:24
web.config file for Rails on IIS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add
name="httpplatformhandler"
path="*"
verb="*"
modules="httpPlatformHandler"
resourceType="Unspecified"
@rip747
rip747 / Files uploaded
Last active August 29, 2015 14:08
CFML Rack Middleware idea for returning a list of uploaded files
<cfscript>
// credit to David "MisterDai" Boyer
// http://misterdai.yougeezer.co.uk/posts/2012/03/08/coldfusion-10-beta-multiple-html5-multiple-uploads-bug/
if (cgi.request_method == 'POST') {
WriteDump(var = form, label = "Form Scope");
for (field in form) {
form[field] = ListToArray(form[field]);
}
WriteDump(var = form, label = "Form Scope - Parsed");
@rip747
rip747 / gist:5888011
Created June 28, 2013 20:52
modified to youtube.cfc for 2.1
<cfcomponent displayName="YouTube CFC" output="false">
<cfset variables.authtoken="">
<cfset variables.username="default">
<cfset variables.devkey="">
<cfset variables.standardurl = "http://gdata.youtube.com/feeds/api/standardfeeds/">
<cffunction name="init" access="public" returnType="youtube" output="false">
<cfargument name="devkey" type="string" required="true">
@rip747
rip747 / SublimeText
Created June 6, 2012 23:17
SublimeText keyboard mapping
[
/* erb temnplate plugin */
{ "keys": ["ctrl+shift+z"], "command": "erb" },
/* the mac keyboard layout SUCKS! Make it like windows */
{ "keys": ["ctrl+left"], "command": "move", "args": {"by": "words", "forward": false} },
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "words", "forward": true} },
{ "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} },
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "words", "forward": true, "extend": true} },
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol", "extend": false} },
@rip747
rip747 / gist:2853902
Created June 1, 2012 17:38
implementing a CFWheels service layer
<!--- add the following to the events/onapplicationstart.cfm --->
<cffunction name="initServices" returntype="void" hint="I initialize the services objects for this app">
<cfset var loc = {}>
<cfset application.$_ServiceObjects = {}>
<cfdirectory action="list" directory="#expandPath('services')#" name="loc.services"/>
<cfloop query="loc.services">
<cfset application.$_ServiceObjects[ListFirst(name, '.')] = createObject("component", "services.#ListFirst(name, '.')#").init()>
</cfloop>
</cffunction>
<cfset initServices()>
@rip747
rip747 / gist:1116619
Created July 31, 2011 08:58
cfwheels api doc generation... idea
<cfcomponent extends="Controller">
<cffunction name="index">
<cfsetting showdebugoutput="false">
<cfset releasesDir ="#get('rootpath')##get('filePath')#/releases">
<cfdirectory action="list" directory="#expandPath(releasesDir)#" filter="*.zip" name="releases">
@rip747
rip747 / wheels tabless model
Created May 19, 2011 02:16
wheels tableless model
diff --git a/wheels/model/initialization.cfm b/wheels/model/initialization.cfm
index 3755c2c..24a6c94 100644
--- a/wheels/model/initialization.cfm
+++ b/wheels/model/initialization.cfm
@@ -45,140 +45,144 @@
// run developer's init method if it exists
if (StructKeyExists(variables, "init"))
init();
-
- // make sure that the tablename has the respected prefix