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
package main | |
import ( | |
//"os" | |
"encoding/csv" | |
"fmt" | |
"strconv" | |
"sort" | |
"time" | |
"net/http" |
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
package main | |
import ( | |
"os" | |
"encoding/csv" | |
"fmt" | |
"strconv" | |
"sort" | |
"time" | |
) |
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
package main | |
import ( | |
"fmt" | |
"strconv" | |
) | |
func main(){ | |
var x int // Declare variable |
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
package main | |
import ( | |
"fmt" | |
) | |
func main(){ | |
x,y:=3,4 // Assignment | |
x,y=y,x // Swap |
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 | |
// file_put_contents("MoviePy.zip", fopen("https://github.com/Zulko/moviepy/archive/master.zip", 'r')); | |
function downloadFile($url, $path) | |
{ | |
$newfname = $path; | |
$file = fopen ($url, 'rb'); |
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 | |
// Items | |
$n = 18; | |
$iterator = ($n>4)?2:1; | |
echo '[ CONTAINER ]<br />'; | |
for($i=0;$i<$n;$i+=$iterator){ | |
echo '[ * col * ]'; | |
echo "{ item ".($i)." }"; | |
if(($n==5 && $i==2) or ($n==6 && $i==4)) { |
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
{% for collection in collections %} | |
{% for product_type in collections[collection].all_types %} | |
<li><a href="/collections/{{ collection.handle }}/{{ product_type | handleize }}">{{ product_type }}</a></li> | |
{% endfor %} | |
{% endfor %} |
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
<!-- | |
Shopify has a limit of 50 post per page, but I needed an image gallery in Masonry style with all images. | |
So I've created different blogs for each type and added images as post featured image. | |
Thus I can upload unlimited images, broken down into separate blogs. | |
--> | |
{% assign gallery = "gallery-ss16, gallery-ss17, gallery-ss17-1" | split: ", " %} | |
{% for i in gallery %} | |
{% for article in blogs[i].articles %} | |
{% if article.image %} | |
<div class="grid-item {% for tag in article.tags %}{{tag}}{% endfor %}"> |
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
http://wordpress.stackexchange.com/questions/158443/one-click-demo-content-installation-feature-in-wordpress-theme-options-panel |
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 | |
/* | |
array get_meta_tags ( string $filename [, bool $use_include_path = false ] ) | |
(PHP 4, PHP 5, PHP 7) | |
ref.: http://php.net/manual/en/function.get-meta-tags.php | |
*/ | |
// Assuming the above tags are at www.example.com | |
$tags = get_meta_tags('http://www.example.com/'); |