TopoJSON simplify demo
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
/** | |
* version1: convert online image | |
* @param {String} url | |
* @param {Function} callback | |
* @param {String} [outputFormat='image/png'] | |
* @author HaNdTriX | |
* @example | |
convertImgToBase64('http://goo.gl/AOxHAL', function(base64Img){ | |
console.log('IMAGE:',base64Img); | |
}) |
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
#!/bin/bash | |
files=$(git diff --cached --name-only | grep '\.jsx\?$') | |
# Prevent ESLint help message if no files matched | |
if [[ $files = "" ]] ; then | |
exit 0 | |
fi | |
failed=0 | |
for file in ${files}; do |
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
### /etc/nginx/sites-available/default | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /var/www/html; | |
index index.html index.htm index.php; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
cities: [ | |
{ name: "Tokyo", coordinates: [139.6917,35.6895], population: 37843000 }, | |
{ name: "Jakarta", coordinates: [106.8650,-6.1751], population: 30539000 }, | |
{ name: "Delhi", coordinates: [77.1025,28.7041], population: 24998000 }, | |
{ name: "Manila", coordinates: [120.9842,14.5995], population: 24123000 }, | |
{ name: "Seoul", coordinates: [126.9780,37.5665], population: 23480000 }, | |
{ name: "Shanghai", coordinates: [121.4737,31.2304], population: 23416000 }, | |
{ name: "Karachi", coordinates: [67.0099,24.8615], population: 22123000 }, | |
{ name: "Beijing", coordinates: [116.4074,39.9042], population: 21009000 }, | |
{ name: "New York", coordinates: [-74.0059,40.7128], population: 20630000 }, |
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
# ---------------------------------------------------------------------- | |
# Apache configuration file | |
# This file is best used in /apache2/httpd.conf, not use in .htaccess because works slower. | |
# | |
# Rules takes from: | |
# - HTML5BoilerPlate: https://github.com/h5bp/html5-boilerplate/ | |
# - W3 Edge: http://www.w3-edge.com/ | |
# - Yahoo! Best Practices: http://developer.yahoo.com/performance/rules.html | |
# - Caching Tutorial: http://www.mnot.net/cache_docs/ | |
# ---------------------------------------------------------------------- |
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
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ name: 'orderBy' }) | |
export class OrderBy implements PipeTransform { | |
transform(array, orderBy, asc = true) { | |
if (!orderBy || orderBy.trim() == "") { | |
return array; | |
} |
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
<h1>Poetry Workshops</h1> | |
<p>We will be conducting a number of poetry workshops and symposiums throughout the year.</p> | |
<p>Please note that the following events are free to members:</p> | |
<ul> | |
<li>A Poetic Perspective</li> | |
<li>Walt Whitman at War</li> | |
<li>Found Poems and Outsider Poetry</li> | |
</ul> | |
<table> | |
<tr> |
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
// Check if user agent is from Apple | |
if(/iPad|iPhone|iPod/.test(navigator.userAgent)){ | |
// actions | |
} else { | |
// Maybe is Android ;) | |
} |