Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
diff --git a/plugins/destinations/term.inc b/plugins/destinations/term.inc | |
index f01c55f..37641a4 100644 | |
--- a/plugins/destinations/term.inc | |
+++ b/plugins/destinations/term.inc | |
@@ -224,7 +224,7 @@ class MigrateDestinationTerm extends MigrateDestinationEntity { | |
} | |
$this->prepare($term, $row); | |
- if (empty($term->name)) { | |
+ if ($term->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
<Directory "/Users/itamar/Sites" > | |
Options FollowSymLinks Indexes MultiViews | |
AllowOverride All | |
Require local | |
</Directory> | |
<VirtualHost *:80> | |
VirtualDocumentRoot /Users/itamar/Sites/%1/www | |
</VirtualHost> |
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
# Add a 1G swap to swapless ubuntu server. (Verify with: free -m) | |
# Adapted from https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04 | |
fallocate -l 1G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
sysctl vm.swappiness=10 | |
echo vm.swappiness=10 >> /etc/sysctl.conf |
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 | |
EMAIL="[email protected]" | |
SITE="mypantheonsite" | |
ENVIRONMENT="live" | |
terminus auth login $EMAIL | |
terminus site backup create --site=$SITE --env=$ENVIRONMENT --element=database | |
DUMPURL=`terminus site backup get --site=$SITE --env=$ENVIRONMENT --element=database --latest` |
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
server { | |
listen 80; | |
server_name localhost; | |
root /home/website/web; | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
try_files $uri @rewriteapp; | |
location @rewriteapp { |
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
/** | |
* Wikilipsum - Fetch a random article from Wikipedia and store it as a jekyll article. | |
* | |
* [email protected] | |
*/ | |
var request = require("request"); | |
var htmlToText = require("html-to-text"); | |
var fs = require("fs"); |
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
int add_operand_lines (char *operand, char *operand_offset, int work_on_src, int i, int line_num, int addr) { | |
switch (addr) { | |
case 0: | |
if ((!commands[i].src_imidiate_address && work_on_src) || (!commands[i].dest_imidiate_address && !work_on_src)) { | |
error_set("Error", "Illegal address.", line_num); | |
return 0; | |
} | |
IC++; | |
line_data = New(LineData); |
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
/** | |
* Profile task; Attach OG related fields. | |
*/ | |
function kaveret_og_setup() { | |
// Group type. | |
og_create_field(OG_GROUP_FIELD, 'node', 'community'); | |
// Group content type | |
$bundles = array( |
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 | |
/** | |
* Destination class implementing migration into field_collection. | |
*/ | |
class garmentboxMigrateDestinationFieldCollection extends MigrateDestinationEntity { | |
/** | |
* The type of entity hosting this collection field (e.g., node). | |
* |
NewerOlder