This file contains 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 | |
$feed = file_get_contents('http://www.adsr.cz/feeds/posts/default'); | |
$xml = simplexml_load_string($feed); | |
$items = array(); | |
foreach($xml->entry as $entry) { | |
$url = null; |
This file contains 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
javascript:(function(){var script = document.createElement('script');script.src = '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js';document.getElementsByTagName('head')[0].appendChild(script);})(); |
This file contains 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
# basic | |
RewriteEngine on | |
RewriteBase / | |
ErrorDocument 404 /404.html | |
# https | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
# always "www" variant |
This file contains 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
#!/bin/bash | |
# https://sublime.wbond.net/packages/ToDone | |
# Check *.todo files in folder and make a list of uncompletted tasks | |
for f in *.todo | |
do | |
hasTasks=false | |
projectName="To do list" | |
projectTasks="" | |
IFS='' |
This file contains 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
/** | |
*===================================================================== | |
* Campaign Monitor API | |
* PHP library: http://campaignmonitor.github.io/createsend-php/ | |
*/ | |
define('API_KEY', ''); | |
define('LIST_ID', ''); | |
include dirname(__FILE__) . '/createsend-php/csrest_subscribers.php'; | |
$wrap = new CS_REST_Subscribers(LIST_ID, API_KEY); |
This file contains 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
/** | |
*===================================================================== | |
* Campaign Monitor API | |
* PHP library: http://campaignmonitor.github.io/createsend-php/ | |
*/ | |
define('API_KEY', ''); | |
define('LIST_ID', ''); | |
include_once dirname(__FILE__) . "/createsend-php/csrest_lists.php"; | |
$wrap = new CS_REST_Lists(LIST_ID, API_KEY); |
This file contains 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 | |
/** | |
* =========================================== | |
* Compare strings and return repeating string | |
* =========================================== | |
* | |
* EXAMPLE: | |
* | |
* $strings = array( | |
* "oh this is repeating string number one", |
This file contains 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
/* Extra small devices (no-need) */ | |
@media (max-width: 767px) { | |
} | |
/* Small devices (tablets, 768px and up) */ | |
@media (min-width: 768px) and (max-width: 991px) { | |
} |
This file contains 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 | |
/** | |
* Translates a number to a short alhanumeric version | |
* | |
* Translated any number up to 9007199254740992 | |
* to a shorter version in letters e.g.: | |
* 9007199254740989 --> PpQXn7COf | |
* | |
* specifiying the second argument true, it will | |
* translate back e.g.: |