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
Sublime Text 2 user settings |
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
Metachar. Name Matches | |
. dot Any one character | |
[...] class Any character listed | |
[^...] negated class Any character NOT listed | |
------------------------------------------------------------- | |
^ caret Start of line | |
$ dollar End of line | |
\< backslash less-than Start of word | |
\> backslash greater-than End of word |
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 | |
// Get path of drupal install and strip path to module | |
$drupal_path = preg_replace('@\/sites\/[a-zA-Z_/]+@i', '', getcwd()); | |
// Create a constant DRUPAL_ROOT that defines our path to the drupal install | |
define('DRUPAL_ROOT', $drupal_path); | |
// require bootstrap | |
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
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 | |
/** | |
* Implements hook_module_implements_alter(). | |
*/ | |
function custom_jquery_update_module_implements_alter(&$implementations, $hook) { | |
if ($hook == 'library_alter') { | |
if(isset($implementations['jquery_update'])) { | |
// Move jquery update to the end. This will make sure our hook_library_alter | |
// is always called before the jquery_update. | |
$jquery_update = $implementations['jquery_update']; |
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
› drush dl drupal --drupal-project-rename="projectname" | |
• Install site | |
› cd projectname/sites/all/modules/ | |
› mkdir contrib custom | |
› drush dl adminimal_theme adminimal_admin_menu module_filter | |
› drush en -y adminimal_admin_menu module_filter | |
› drush variable-set admin_theme adminimal |
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
• define […] | |
- Defines a word, in english, also on the danish site | |
• #[…] | |
- Searches the web for hashtags | |
• +[…] | |
- Searches Google+ | |
• $[…] | |
- Given a number, searches for a price | |
• @[…] | |
- Given a name, seaches for people (on mostly social networks) |
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
• SSH to your server to start creating a subdomain (https://library.linode.com/hosting-website#sph_configuring-name-based-virtual-hosts) | |
• Go to ~/public/ | |
› mkdir -p sub.example.com/{public,log,backup} | |
› cd sub.example.com/public/ | |
› nano index.html | nano index.php | |
• Write 'Hello world' or whatever, we just need a html|php file to test with |
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
Update and install requirements: | |
› sudo apt-get update | |
› sudo apt-get dist-upgrade | |
› sudo apt-get install matchbox chromium x11-xserver-utils ttf-mscorefonts-installer xwit sqlite3 libnss3 | |
Curl to desktop, cat file and copy-paste into existing files: | |
› curl -L --output /home/pi/Desktop/config.txt --get https://gist.githubusercontent.com/klan/7482956/raw/ebe5b60527aad2bec93e23035cbc07ee5b6a3d9b/config.txt | |
› curl -L --output /home/pi/Desktop/rc.local --get https://gist.githubusercontent.com/klan/7482956/raw/33786a1c5c9448bf30cd037950169679a718fb79/rc.local | |
Curl new file to location: |
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
// Automatically generated configuration file for 'Hyperion daemon' | |
// Generated by: HyperCon (The Hyperion deamon configuration file builder | |
{ | |
/// Device configuration contains the following fields: | |
/// * 'name' : The user friendly name of the device (only used for display purposes) | |
/// * 'type' : The type of the device or leds (known types for now are 'ws2801', 'ldp8806', | |
/// 'lpd6803', 'sedu', 'adalight', 'lightpack', 'test' and 'none') | |
/// * 'output' : The output specification depends on selected device. This can for example be the | |
/// device specifier, device serial number, or the output file 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
-- Vejret update category_id in series | |
UPDATE `series` SET 'category_id' = 33 WHERE 'id' = 715; | |
-- Vejret update category_id in program | |
UPDATE `program` SET 'category_id' = 32 WHERE 'series_id' = 715; |
OlderNewer