This file contains hidden or 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
rig project run grunt validate | |
rig project run cli "php ./vendor/bin/phpcbf --standard=./vendor/drupal/coder/coder_sniffer/Drupal src/modules/" |
This file contains hidden or 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
git clone --mirror [source git URL] | |
cd repo | |
git push --mirror [mirror git URL] |
This file contains hidden or 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
<html> | |
<body> | |
<div id="app"> | |
<div> | |
{{ notes }} | |
</div> | |
<button @click='increase'>Increase</button> | |
<button @click='decrease'>Decrease</button> | |
</div> |
This file contains hidden or 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
Planetary Aliance | |
Interglatic Agency | |
Ship registry - DCC (Defense Construction Contract) | |
Interglatic Space Ship | |
Vulcans (Majellians) - Logic Antenae black blood (silver) | |
Romulans (DeKelles (keels) - Viacomunist Government) | |
Klingons (Koenigoids) - Tusked wookies | |
Halcyon (Bird of prey) | |
Andorians (Rodderians) - Green skins w/ Pointy ears |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Authorize to GitHub to get the latest release tar.gz | |
# Requires: oauth token, https://help.github.com/articles/creating-an-access-token-for-command-line-use/ | |
# Requires: jq package to parse json | |
# Your oauth token goes here, see link above | |
OAUTH_TOKEN="34k234lk234lk2j3lk4j2l3k4j2kj3lk" | |
# Repo owner (user id) | |
OWNER="your-user-name" |
This file contains hidden or 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
{ | |
"type": "news_entry", | |
"action": "save", | |
"entry": { | |
"article_type": "post", | |
"ads_enabled": 1, | |
"comments_enabled": 0, | |
"search_enabled": 1, | |
"publication_date": "1410147525", | |
"breaking_news": 0, |
This file contains hidden or 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
<? | |
$link = $row->lnk; | |
if (strpos($link, 'www.facinghistory.org/') !== FALSE) { | |
$row->lnk = str_replace('www.facinghistory.org/', '', $row->lnk); | |
} | |
if (strpos($link, 'www.facing.org/') !== FALSE) { | |
$row->lnk = str_replace('www.facing.org/', '', $row->lnk); | |
} |
This file contains hidden or 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
-- Thanks to David (@nadavoid) for working this out. | |
- [custom_module].module | |
<?php | |
/** | |
* Implements hook_ctools_plugin_directory(). | |
*/ | |
function [custom_module]_ctools_plugin_directory($module, $plugin) { | |
if ($module == 'addressfield') { | |
return 'plugins/addressfield/' . $plugin; |
This file contains hidden or 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
$result = db_query(SELECT a.field_1, b.field_2 as second_field, CONCAT('My', 'S', 'QL') as mysql FROM table_1 a LEFT OUTER JOIN table_2 b ON b.id = a.id WHERE a.field_3 >= 25 and a.field_4 = 'this' ORDER BY a.field_5 DESC); | |
// Would be equivalent to. | |
$query = db_select('table_1', 'a'); | |
$query->fields('a', array('field_1')) | |
->addExpression("CONCAT('My', 'S', 'QL')", 'mysql') | |
->leftjoin('table_2', 'b', 'b.id = a.id') | |
->addField('b', 'field_2', 'second_field') |
This file contains hidden or 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
<?php | |
//Since PHP 5.3: http://www.php.net/manual/en/functions.anonymous.php | |
$array_to_be_filtered = array( | |
1 => 'apple', | |
2 => 'orange', | |
3 => 'pinapple', | |
4 => 'plum', | |
5 => 'tangelo', | |
6 => 'plum' |
NewerOlder