Skip to content

Instantly share code, notes, and snippets.

View hmboyd's full-sized avatar

Hmboyd hmboyd

View GitHub Profile
@hmboyd
hmboyd / 0_reuse_code.js
Created September 30, 2015 17:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html>
<head>
<script id="entry-template" type="text/x-handlebars-template">
<div class="entry">
<h1>{{title}}</h1>
<div class="body">
{
"createTime": "2020-01-07T21:59:43.314Z",
<?php echo get_stylesheet_directory_uri() ?> // Insert theme Path in wordpress
![](https://cdn.cacher.io/attachments/u/36mtg8numox35/7C0Ih9g1d7VkFGoyPM1OQ85Vw4x4whoX/custom-search-view.png)
- Zie screenshot in bijlage
- Voorbeeld: zie Prime Time website
- Noteer de URL van de Content Search page hier: admin/config/search/pages
- (meestal is dat /search/node) > Deze view zal die URL overriden
{
"status": true,
"code": 200,
"program": "myprog",
"version": "1.2.3",
"datetime": "2016-10-06T19:58:29Z",
"message": "OK",
"error": {
"code": 404,

This solves the problem if a git submodule from another remote repository is not
being cloned during the initial clone from the master branch.

git clone --branch feature/init-branch <remote-clone-url>
cd <repo-dir>
git submodule init
git submodule update
<?php
$csvData = readCSV("./../example.csv");
// restituisce un array di righe (compesa l'intestazione)
// ogni riga è un array con indici numerici, 0 = prima colonna, 1 = seconda colonna, ecc...
function readCSV($csvFile){
$file_handle = fopen($csvFile, 'r');
while (!feof($file_handle) ) {
$rows = fgetcsv($file_handle, 1024, ";");
if($rows) {
<?php
$delimiter = ";";
$filename = "example_" . date('Y-m-d H:i:s') . ".csv";
$f = fopen('php://memory', 'w');
// intestazione
$intestazioni[] = "ID";
$intestazioni[] = "NOME";
$intestazioni[] = "COGNOME";