Skip to content

Instantly share code, notes, and snippets.

View dasginganinja's full-sized avatar

Tom Donahue dasginganinja

  • Lehigh University
  • Bethlehem, PA
View GitHub Profile
@dasginganinja
dasginganinja / Box Setup.txt
Created December 3, 2013 14:09
A little look at what's going on with FileConveyor & Cumulus / Rackspace Cloudfiles ERROR
Jeremys-Mac:squeeze-20131203 james$ vagrant box list
Debian 6 Squeeze x64 according to documentation (virtualbox)
Jeremys-Mac:squeeze-20131203 james$ vagrant init "Debian 6 Squeeze x64 according to documentation"
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
Jeremys-Mac:squeeze-20131203 james$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'Debian 6 Squeeze x64 according to documentation'...
@dasginganinja
dasginganinja / RatRace.php
Last active December 30, 2015 04:29
I absolutely love GoTos and I don't know why..
<?php
/**
* Retrieves the title of the Content Item with the given filepath
*/
function km_zipcart_get_title($file) {
// Start our query with searching for the file
$qf = db_select('file_managed','fm');
$qf->condition('fm.filename',$file,'=');
// Get the fields we need
$qf->fields('fm', array('fid','filename'));
// Main containers
.container
@include outer-container
// Rows
.row
@include row()
// A basic column without a defined width or height
@dasginganinja
dasginganinja / fix-admin-menu.php
Created February 10, 2016 14:19
Admin Menu Full Rebuild Fix
<?php
db_query("DELETE FROM {menu_links} WHERE module = 'system'");
db_query("DELETE FROM {menu_links} WHERE menu_name = 'management'");
menu_rebuild();
@dasginganinja
dasginganinja / drupal-bootstrap-fix.scss
Created March 16, 2016 16:51
SASS for bootstrap form elements in Drupal by extending bootstrap
.form-item {
@extend .form-group;
select,
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
@dasginganinja
dasginganinja / sh_drupal_language.php
Last active May 10, 2016 11:30
Drupal Bulk Language Changer (Uses Views Bulk Options)
$view = new view();
$view->name = 'sh_drupal_languages';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'sh_drupal_languages';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@dasginganinja
dasginganinja / disable.pokevision.timeout.js
Last active July 26, 2016 12:01
Pokevision 30s disabler
// Run this in your javascript console
App.home.TIMER_ERROR = App.home.TIMER_JOB = App.home.TIMER_SCAN_DELAY = App.home.TIMER_SCAN_ERROR = App.home.TIMER_TIMER_UPDATE = 1000;
@dasginganinja
dasginganinja / pokemans
Created July 28, 2016 03:38
pokemon locations
https://pokevision.com/#/@40.58047058555029,-75.58394193649292
Chapmans Rd near Blue Barn -- https://pokevision.com/#/@40.60922852398531,-75.58470368385315
tentacool - https://pokevision.com/#/@40.60656913748868,-75.58687090873718
vulpix / drowzee - https://pokevision.com/#/@40.583827673731975,-75.59106588363647
goldduck - https://pokevision.com/#/@40.594455983617884,-75.50577163696289
@dasginganinja
dasginganinja / page.tpl.php
Created December 8, 2016 19:05
Drupal 7 Search Block Form - Custom Markup
<div class="searchWrapper">
<div class="searchContainer">
<?php print $search_box; ?>
</div>
</div>
@dasginganinja
dasginganinja / view.export
Created December 28, 2016 15:46
Drupal 7 Views - Paragraphs Bundle Breakdown
$view = new view();
$view->name = 'bundles_usage';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'paragraphs_item';
$view->human_name = 'Bundles usage';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */