Skip to content

Instantly share code, notes, and snippets.

Avatar

Cottser

  • Digital Echidna
  • Canada
View GitHub Profile
View 2305017_file_lost.php
<?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 Aug 29, 2015
D8 config in files for development
View config-dev.patch
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 Nov 18, 2020
The Ultimate Git Alias Setup
View git-aliases.md

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 Nov 25, 2020 — forked from buu700/jquery.waituntilexists.js
Updated waitUntilExists plugin
View jquery.waituntilexists.js
;(function ($, window) {
var intervals = {};
var removeListener = function(selector) {
if (intervals[selector]) {
window.clearInterval(intervals[selector]);
intervals[selector] = null;
}
@dlo
dlo / allpinboard.py
Last active Sep 5, 2019 — 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.
View allpinboard.py
#!/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 Sep 30, 2015 — forked from Cottser/Custom.css
My Custom.css for Chrome Dev Tools. Built using https://github.com/bentruyman/devtools-themes (IR_Black) with personalizations.
View Custom.css
@-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
View style.css
/* 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 Aug 17, 2011
IR_Black Theme for Chrome Developer Tools
View Custom.css
/**********************************************/
/*
/* 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 Jun 3, 2011
Make back/forward buttons work on jQuery UI tabs.
View ui-tabs.js
//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;
You can’t perform that action at this time.