onKeyboardWillHide(e) {
Animated.timing(this.state.height, {
toValue: this.listViewMaxHeight,
duration: e.duration,
easing: Easing.bezier(0.1, 0.76, 0.55, 0.9)
}).start();
},
onKeyboardWillShow(e) {
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
<?php | |
use \parallel\{Runtime, Future, Channel, Events}; | |
/* usage php crawler.php [http://example.com] [workers=8] [limit=500] */ | |
$page = $argv[1] ?: "https://blog.krakjoe.ninja"; # start crawling this page | |
$workers = $argv[2] ?: 8; # start this number of threads | |
$limit = $argv[3] ?: 500; # stop at this number of unique pages | |
$timeout = $argv[4] ?: 3; # socket timeout for producers |
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
'use strict'; | |
import React, { | |
AppRegistry, | |
Component, | |
StyleSheet, | |
Text, | |
View, | |
TouchableOpacity, | |
LayoutAnimation, | |
} from 'react-native'; |
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
// sending to sender-client only | |
socket.emit('message', "this is a test"); | |
// sending to all clients, include sender | |
io.emit('message', "this is a test"); | |
// sending to all clients except sender | |
socket.broadcast.emit('message', "this is a test"); | |
// sending to all clients in 'game' room(channel) except sender |
made with esnextbin
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
const path = Plugin.path; | |
const fs = Plugin.fs; | |
const sass = Npm.require('node-sass'); | |
const Future = Npm.require('fibers/future'); | |
const files = Plugin.files; | |
Plugin.registerCompiler({ | |
extensions: ['scss', 'sass'], | |
archMatching: 'web' | |
}, () => new SassCompiler()); |
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
// Provides a mixin to define hyphenation | |
// | |
// Requires Compass | |
// | |
// (http://blog.fontdeck.com/post/9037028497/hyphens) | |
// (http://www.w3.org/TR/css3-text/#hyphenation) | |
// | |
// $value - The hyphenation property value. One of "none", "manual", "auto" or "all" | |
// | |
// Example .scss: |
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
/* | |
* Swipe 2.0 | |
* | |
* Brad Birdsall | |
* Copyright 2012, Licensed GPL & MIT | |
* | |
*/ | |
window.Swipe = function(element, options) { |
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
$ionicViewSwitcher.nextDirection('forward '); | |
$state.go('app.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
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
NewerOlder