Skip to content

Instantly share code, notes, and snippets.

@yanniboi
yanniboi / .travis.yml
Created December 9, 2015 14:22
.travis.yml with drupal_ti
# @file
# .travis.yml - Drupal 8 Travis CI Integration
language: php
sudo: false
php:
# - 5.5
- 5.6
@yanniboi
yanniboi / .travis.yml
Last active December 9, 2015 14:02
Working Drupal Travis File
# @file
# .travis.yml - Drupal 8 Travis CI Integration
language: php
php:
- 5.6
mysql:
database: drupal
@yanniboi
yanniboi / clinks_test_tickets.php
Created December 4, 2015 14:11
Test clinks ticket classes
@yanniboi
yanniboi / 0_reuse_code.js
Created December 4, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yanniboi
yanniboi / d8_reset.sh
Created October 3, 2014 14:18
Reinstall a clean drupal 8 site
#!/bin/sh
# Removes an existing Drupal 8 install, then install again.
# Requires Drush 7 - https://github.com/drush-ops/drush
#
# Run this script from the docroot of a Drupal 8 checkout.
# Installs to mysql://localhost/drupal, user 1 user/pass is admin/admin.
if [ ! -e ./core/core.services.yml ]
then
@yanniboi
yanniboi / ymca.txt
Created September 11, 2014 08:32
Morning exercise
\o/
/ǒ\
/o/
/o\
@yanniboi
yanniboi / project.aliases.drushrc.php
Created July 14, 2014 13:59
Drush Rebuild script template
<?php
/**
* @file
* DrushRC file for http://project.com
*/
$aliases['local'] = array (
'root' => '/var/www/project/site',
'uri' => 'http://project.dev',
@yanniboi
yanniboi / update.php
Last active August 29, 2015 14:01
Unpublish CD and DVD talks
<?php
/**
* Unpublish CD and DVD mediums fro talks.
*/
function sss_tweaks_update_7002(&$sandbox) {
$query = "SELECT nid FROM {node} WHERE type='talks'";
// Set up vars.
if (!isset($sandbox['total'])) {
@yanniboi
yanniboi / license_create.php
Last active August 29, 2015 14:00
Generate commerce file license
<?php
$fid = ''; // ID of the file you want to license.
$uid = ''; // ID of the user receiving the license.
$line_item_id = ''; // Optional - Id of line item in an order owned by the user.
// Get the entities.
$user = user_load($uid);
$file = file_load($fid);
@yanniboi
yanniboi / gist:11258978
Created April 24, 2014 15:32
Global gitignore file
Create a .gitignore file in your home directory and then run:
git config --global core.excludesfile '~/.gitignore'