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
// You can run this script as part of your build step in your package.json | |
// eg: | |
// ... | |
// "scripts": { | |
// "build": "node get-content.js && hugo" | |
// } | |
// ... | |
var fs = require('fs'); //to access filewrite | |
var toMarkdown = require ('to-markdown'); //to convert HTML to Markdown |
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
/* | |
* This script will download a package (and all of its dependencies) from the | |
* online NPM registry, then create a gzip'd tarball containing that package | |
* and all of its dependencies. This archive can then be copied to a machine | |
* without internet access and installed using npm. | |
* | |
* The idea is pretty simple: | |
* - npm install [package] | |
* - rewrite [package]/package.json to copy dependencies to bundleDependencies | |
* - npm pack [package] |
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 pt.beware.core; | |
import android.location.Location; | |
import pt.beware.common.utils.Log; | |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; |
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
# Create an alias directory in XAMPP | |
# Ref: http://www.mauriciomunera.com/?p=127 | |
# Ref: https://gist.github.com/ralphcrisostomo/4974674/ | |
# Open the file /Applications/xampp/etc/httpd.conf in a text editor. | |
# Add these lines to the end of the files. (change the name of the alias for the web application that suits better for you) | |
<IfModule alias_module> | |
# | |
# Redirect: Allows you to tell clients about documents that used to | |
# exist in your server's namespace, but do not anymore. The client | |
# will make a new request for the document at its new location. |
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 com.yourco.yourapp; | |
import java.util.ArrayList; | |
import java.util.List; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; |
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
/* | |
Modernizr already has a test for cssgradients but it checks the old webkit syntax | |
In order to do px points we need linear-gradient() | |
Webkit did not have suport for linear-gradient() until Jan 2011 | |
http://webkit.org/blog/1424/css3-gradients/ | |
So here is a test to check for it. | |
*/ | |
Modernizr.addTest('lineargradient', function () { | |
var test = document.createElement('div'), |