A Pen by Hellon Canella on CodePen.
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
function flatten(A) { | |
let flattened = [] | |
A.forEach(item => { | |
if (Array.isArray(item)) item = flatten(item) | |
flattened = flattened.concat(item) | |
}) | |
return flattened | |
} |
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
fetch('http://www.band.uol.com.br/rss/colunista_64.xml').then(res=>res.arrayBuffer()}) | |
.then(arrayBuffer => iconv.decode(new Buffer(arrayBuffer), 'iso-8859-1').toString()) | |
.then(converted => console.log(converted)) |
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
@mixin fluid-grid($cols:12, $gutter:1%, $grid-max-width:960px, $internal-lateral-padding:5%) { | |
.grid { | |
max-width: #{$grid-max-width}; | |
margin: 0 auto; | |
padding: 0 #{$internal-lateral-padding}; | |
&>* { | |
float: left; | |
} | |
@include clearFloat() |
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
import React from 'react' | |
import {Loading} from '/client/pages/loading/loading.jsx' | |
import {Translations} from '/lib/collections/translations' | |
import {Session} from '/meteor/session' | |
export class TranslatorComponent extends Component{ | |
render(){ | |
return( |
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
import React, {Component} from 'react' | |
import i18n from 'meteor/universe:i18n'; | |
import {supportedLanguages} from '/i18n/_supported_languages' | |
import { Session } from 'meteor/session' | |
import { Tracker } from 'meteor/tracker' | |
import _ from 'lodash' | |
const T = i18n.createComponent(); | |
Meteor.startup(()=>{ |
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
import * as React from 'react' | |
import { AppBar, FontIcon, IconButton } from 'material-ui' | |
import {browserHistory} from 'react-router' | |
function _backHistory(){ | |
console.log('hello') | |
alert('hello') | |
browserHistory.push('./home') | |
} |
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
<link href="https://fonts.googleapis.com/css?family=Dosis:400,500" rel="stylesheet"> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 988.9 659.3" style="enable-background:new 0 0 988.9 659.3;" xml:space="preserve"> | |
<style type="text/css"> | |
.st0{fill:white; fill-opacity:0; stroke-width:1.0;stroke-miterlimit:10; stroke: white} | |
.st1{fill:url(#SVGID_1_);} | |
.st2{fill:url(#SVGID_2_);} | |
.st3{fill:url(#SVGID_3_);} | |
.st4{fill:url(#SVGID_4_);} |
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
/* | |
_.move - takes array and moves item at index and moves to another index; great for use with jQuery.sortable() | |
*/ | |
_.mixin({ | |
move: function (array, fromIndex, toIndex) { | |
array.splice(toIndex, 0, array.splice(fromIndex, 1)[0] ); | |
return array; | |
} | |
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
#!/bin/sh | |
if [ -t 0 ]; then | |
if [ -z "$1" ]; then | |
echo "usage: tny long_url [custom_keyword]" | |
echo "" | |
echo "Shorten URLs with tny.im URL shortener" | |
echo "This script expects a long URL to shorten either as an argument or passed through STDIN." | |
echo "When using arguments, an optional second argument can be provided to customize the later part of the short URL (keyword)." | |
exit 1 | |
fi |
NewerOlder