uname -r ##identify the kernel you are presently booting DO NOT remove this one ! Keep one other for a back up. dpkg -l | grep linux-image- ##identify all installed kernel images dpkg -l | grep linux-headers- ##identify all kernel header files sudo apt-get --purge remove linux-image-3.2.0-31-generic ##for example sudo apt-get --purge remove linux-headers-3.2.0-31-generic ##for example
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 | |
set_time_limit(4000); | |
// Connect to gmail | |
$imapPath = '{imap.gmail.com:993/imap/ssl}INBOX'; | |
$username = '<your-email>'; | |
$password = '<email-password>'; | |
// try to connect | |
$inbox = imap_open($imapPath,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error()); |
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
var zip = new JSZip(); | |
// Get all the highchart elements | |
var hc_containers = document.querySelectorAll('.highcharts-container'); | |
if (hc_containers.length) { | |
hc_containers.forEach(function(hc, index) { | |
// Get the highchart Chart object. | |
chart_ele = hc.parentNode; | |
var chart = chart_ele.highcharts(); | |
// Get the svg data from chart. | |
var svg = chart.getSVG({chart:{ width: 1040 }}); |
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
uname -r ##identify the kernel you are presently booting DO NOT remove this one ! Keep one other for a back up. | |
dpkg -l | grep linux-image- ##identify all installed kernel images | |
dpkg -l | grep linux-headers- ##identify all kernel header files | |
sudo apt-get --purge remove linux-image-3.2.0-31-generic ##for example | |
sudo apt-get --purge remove linux-headers-3.2.0-31-generic ##for example |
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 | |
$field = field_read_instance('node', 'field_xxx', '<content_type>'); | |
$field['label'] = 'New Label'; | |
field_update_instance($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
// If we want to export some more info or calculated column in export csv data | |
// we can create a fake series with minimal required props and then push to chart.series | |
// and highchart will export that. | |
var s = { | |
name: "Test2", | |
options: { | |
stickyTracking: true | |
}, | |
points: [{ |
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
Show hidden characters
{ | |
"cmd": ["/Users/MYUSER/.composer/vendor/bin/phpcs", "--report=emacs", "--standard=Drupal", "--extensions=php,module,inc,install,test,profile,theme", "$file"], | |
"file_regex": "^(.*):(.*):(.*):(.*)$", | |
"variants": [ | |
{ | |
"name": "Run", | |
"cmd": ["/Users/MYUSER/.composer/vendor/bin/phpcbf", "--standard=Drupal", "--extensions=php,module,inc,install,test,profile,theme", "$file"] | |
} | |
] | |
} |
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
Set title same as value attribute | |
Find: value="chart*(\w+)" | |
Replace: value="chart$1" title="chart$1" | |
Set title same as text within element | |
Find: title="chart*(\w+)">*(.+?>) | |
Replace: title="$2">$2 | |
Single attribute selection and replace |
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
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin placeholder($extend: true) { | |
@if($extend) { | |
@extend %placeholder; | |
} | |
@else { |
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
.story-box { | |
&__header { | |
font-weight: 500; | |
} | |
&:hover &__header { | |
text-decoration: underline; |