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
######################### | |
# | |
# NODE.JS app running in Apache | |
# sample .htaccess - partialy based on vielhuber/.htaccess | |
# Also rules to enforce www. prefix and https: SSL access | |
# | |
# This file must be on the dir where Apache expects to find the website | |
# The Node App can be anywhere else but must be accessible as explained below. | |
# |
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
// @flow | |
import fs from 'fs'; | |
// Public: Download a file and store it on a file system using streaming with appropriate progress callback. | |
// | |
// * `sourceUrl` Url to download from. | |
// * `targetFile` File path to save to. | |
// * `progressCallback` Callback function that will be given a {ByteProgressCallback} object containing | |
// both bytesDone and percent. |
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
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Example of `object pool' design pattern | |
# Copyright (C) 2011 Radek Pazdera | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |