Skip to content

Instantly share code, notes, and snippets.

CREATE TABLE widgets (
id int NOT NULL identity(1,1),
uuid varchar(100) NOT NULL,
title varchar(250) NOT NULL,
thumbnail varchar(300) DEFAULT NULL,
@mah0001
mah0001 / form.json
Last active February 10, 2017 16:35 — forked from anonymous/form.json
A saved configuration for a schema form example, http://textalk.github.io/angular-schema-form/examples/bootstrap-example.html
[
{
"_schema": "ddi2 codebook",
"_title": "DDI2 IHSN template",
"_description": "Template for Survey data type based on DDI 2.5",
"type": "fieldset",
"htmlClass": "form_fieldset form-fieldset-toggle",
"title": "Document",
"onClick": "toggle()",
"items": [
@mah0001
mah0001 / get-xml-paths.php
Created April 9, 2014 18:39
Get all XML paths using PHP/SimpleXML
<?php
//usage
$paths_array=$print_paths("path-to-xml-file");
var_dump($paths_array);
function print_paths($xml_file)
@mah0001
mah0001 / curl-partial-download.php
Created June 15, 2012 01:23
Partial downloading of files using CURL with PHP
/**
*
* Using CURL to download partial content from a URL
*
* @url file URL to download
* @range_start Start range in bytes
* @range_end End range in bytes
*
*
* example: curl_get_content("http://www.example.org/some-file.zip",100,500)