Skip to content

Instantly share code, notes, and snippets.

View star-szr's full-sized avatar

star-szr

View GitHub Profile
@lancethomps
lancethomps / close_notifications_applescript.js
Last active October 31, 2024 15:09
AppleScript to close all notifications on macOS Big Sur, Monterey, and Ventura
function run(input, parameters) {
const appNames = [];
const skipAppNames = [];
const verbose = true;
const scriptName = "close_notifications_applescript";
const CLEAR_ALL_ACTION = "Clear All";
const CLEAR_ALL_ACTION_TOP = "Clear";
<?php
/**
* Lists bundles that have a field of type image or file for D7.29 regression
* https://www.drupal.org/node/2305017
*
* Download this script on your server/localhost and run
* drush php-script 2305017_file_lost.php
*/
@sun
sun / config-dev.patch
Last active August 29, 2015 13:59
D8 config in files for development
diff --git a/sites/default/settings.php b/sites/default/settings.php
index b2ce930..9d0514e 100644
--- a/sites/default/settings.php
+++ b/sites/default/settings.php
@@ -611,7 +611,8 @@
* The 'bootstrap_config_storage' setting needs to be a callable that returns
* core.services.yml.
*/
- # $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage');
+$settings['bootstrap_config_storage'] = 'Drupal\Core\Config\BootstrapConfigStorageFactory::getFileStorage';
@mwhite
mwhite / git-aliases.md
Last active October 17, 2024 20:51
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@PizzaBrandon
PizzaBrandon / jquery.waituntilexists.js
Last active August 24, 2023 14:23 — forked from buu700/jquery.waituntilexists.js
Updated waitUntilExists plugin
;(function ($, window) {
var intervals = {};
var removeListener = function(selector) {
if (intervals[selector]) {
window.clearInterval(intervals[selector]);
intervals[selector] = null;
}
@dlo
dlo / allpinboard.py
Last active September 5, 2019 15:26 — forked from ttscoff/allpinboard.rb
Python version of https://gist.github.com/3773519 that pulls all bookmarks on the first sync, and does incremental updates afterwards. Also uses the Mac OS X keychain to retrieve your password so it doesn't need to live in a file on your computer in plain text.
#!/usr/bin/env python
"""
This script is designed to generate a simple html file with _all_ of your
Pinboard.in bookmarks The HTML file can be added to Launchbar's index as a
custom bookmark file and you can search your entire Pinboard.in collection
instantly from Launchbar (by title only). It includes any applied tags as part
of the title to aid in searching.
You should edit the `username`, `bookmark_filename`, and `local_timezone`
@davidl
davidl / Custom.css
Last active September 30, 2015 19:07 — forked from star-szr/Custom.css
My Custom.css for Chrome Dev Tools. Built using https://github.com/bentruyman/devtools-themes (IR_Black) with personalizations.
@-webkit-keyframes webkit-inspector-error{0%{color:#ff6c60} 50%{color:#f91300} 100%{color:#ff6c60}}@-webkit-keyframes webkit-inspector-fadeout{from{background-color:#c5c8c6} to{background-color:#1d1f21}}#-webkit-web-inspector{background-color:#1d1f21}#-webkit-web-inspector .monospace,#-webkit-web-inspector .source-code{font-family:'DroidSansMono',Menlo,monospace !important}
#-webkit-web-inspector ::selection{background:rgba(197,200,198,0.25) !important;opacity:1}
#-webkit-web-inspector #toolbar{background-image:-webkit-linear-gradient(#444, #333) !important;border-bottom:1px solid #444 !important;border-top:1px solid #000 !important}
#-webkit-web-inspector #toolbar .toolbar-label{color:#c5c8c6 !important}
#-webkit-web-inspector #toolbar .toggled-on .toolbar-label{color:#f9faf9 !important}
#-webkit-web-inspector #toolbar .toolbar-item.toggleable.toggled-on{background-image:-webkit-linear-gradient(#333, #444) !important}
#-webkit-web-inspector #search-results-matches{color:#f9faf9 !important;text-shadow:none !i
@gavinblair
gavinblair / style.css
Created January 10, 2012 15:56
hidden
/* from HTML5 Boilerplate http://html5boilerplate.com/ */
/* For image replacement */
.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
.ir br { display: none; }
/* Hide for both screenreaders and browsers:
css-discuss.incutio.com/wiki/Screenreader_Visibility */
.hidden { display: none; visibility: hidden; }
@bentruyman
bentruyman / Custom.css
Created August 17, 2011 00:30
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@gavinblair
gavinblair / ui-tabs.js
Created June 3, 2011 15:37
Make back/forward buttons work on jQuery UI tabs.
//change the # in the url when switching tabs
//makes refresh work!
$("#tabsMenu li a").click(function(){
window.location.hash = $(this).attr("href");
});
//make back/forward buttons work on tabs
if($("#tabsMenu").length > 0) {
//prevent scrolling when clicking on a tab
var doit = true;