Skip to content

Instantly share code, notes, and snippets.

{
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
@matiangul
matiangul / gist:5775803
Created June 13, 2013 17:52
php function is available
<p>PHP server says that curl_exec function is <?php echo function_exists("curl_exec") == true ? 'available' : 'not available'; ?></p>
@matiangul
matiangul / gist:5679140
Created May 30, 2013 16:15
delete post autosave
DELETE FROM `wp_posts` WHERE `post_name` = '188-autosave'
@matiangul
matiangul / gist:5671082
Created May 29, 2013 15:15
Change wordpress post date
UPDATE `admin_peoplegroup`.`wp_posts` SET
`post_date` = '2013-05-14 10:50:01',
`post_date_gmt` = '2013-05-14 10:50:01',
`post_modified` = '2013-05-14 10:50:01',
`post_modified_gmt` = '2013-05-14 10:50:01'
WHERE `wp_posts`.`ID` = 137;
@matiangul
matiangul / gist:5670745
Last active December 17, 2015 20:49
Split words in sentence into lines
base.breakAfterWhiteSpace = function() {
var $el = $(this),
text = $el.text(),
splitted = text.split(' '),
newText = splitted[0];
for(var i=1;i<splitted.length; i++) {
newText = newText + '</br>' + splitted[i];
}
console.log(newText);
$el.html(newText).addClass('splitted');