This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Delete Facebook Videos | |
// @description This script deletes videos from your Videos album. | |
// @version 1 | |
// @grant none | |
// @match https://www.facebook.com/*/media_set?*type=2 | |
// @run-at document-idle | |
// ==/UserScript== | |
function promiseDelay(timeout) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Delete Facebook Albums | |
// @version 1 | |
// @grant none | |
// @match https://www.facebook.com/*/photos_albums | |
// @run-at document-idle | |
// ==/UserScript== | |
function promiseDelay(timeout) { | |
return new Promise((r) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git checkout master | |
git pull | |
git fetch --prune | |
BRANCHES=`git branch --merged | grep -v master` | |
IFS=$'\n' | |
for i in $BRANCHES; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let collapseElements = document.querySelectorAll('[data-toggle="collapse"]'); | |
const CLASS_SHOW = 'show'; | |
const CLASS_COLLAPSE = 'collapse'; | |
const CLASS_COLLAPSING = 'collapsing'; | |
const CLASS_COLLAPSED = 'collapsed'; | |
const ANIMATION_TIME = 350; // 0.35s | |
function handleCollapseElementClick(e) { | |
let el = e.currentTarget; | |
let collapseTargetId = el.dataset.target || el.href || null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NullLikeMatcher { | |
constructor() { | |
this.$$typeof = Symbol.for('jest.asymmetricMatcher'); | |
} | |
asymmetricMatch(value) { | |
return value === null || value === undefined; | |
} | |
toString() { | |
return 'NullLike'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion | |
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
export PATH="~/bin:/usr/local/bin:/usr/local/sbin:$PATH" | |
export PATH="$PATH:`yarn global bin`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
current.variables['variable_name'].getGlideObject().getDisplayValue(); // For the displayed value | |
current.variables['variable_name'].getGlideObject().getValue(); // For the real value (sys_id when it is a reference) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var view = g_request.getParameter('sysparm_view'); | |
if (!view && ! gs.getUser().hasRoles()) | |
view = 'ess'; | |
if (view == 'ess' || view == 'checkout') { | |
var checkOutForm = gs.getProperty('glide.sc.checkout.form', 'com.glideapp.servicecatalog_checkout_view'); | |
if (checkOutForm == 'com.glideapp.servicecatalog_checkout_view') { | |
var realID = g_uri.get('sys_id'); | |
g_uri.set('sysparm_sys_id', realID); | |
answer = g_uri.toString('com.glideapp.servicecatalog_checkout_view.do'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Status < ActiveRecord::Base | |
... | |
before_destroy :check_existing_events | |
private | |
... | |
def check_existing_events | |
raise Exception.new("Events exist that use that status.") unless Event.where(:status_id => self.id).count == 0 | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove Cisco Voicemails >= 30 days old from the Downloads folder | |
# 08/27/2012 | |
## Use the debug value to change whether or not you delete things or say what you would delete | |
$debug = $TRUE | |
## Do you want to say which files you deleted? | |
$output = $TRUE | |
## Set the folder to the base directory you want to start your searches in |
NewerOlder