while true; do
./adb shell input swipe 100 400 4000 400 400;
done
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
{% extends '@YourWhateverNameYouUseBundle/layout.html.twig' %} | |
{% block body %} | |
<button class="btn">Hello {{ name }}!</button> | |
{# example: use for regular assets somewhere deep in your javascripts #} | |
{# assets:install --env=... has to be run beforehand #} | |
<script type="text/javascript" src="{{ asset('bundles/yourwhatevernameyouusebundle/js/ckeditor/ckeditor.js') }}"></script> | |
{% endblock body %} |
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
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/node:latest | |
steps: | |
- checkout | |
- run: npm install | |
- run: npx gulp build | |
- run: node .circleci/deploy.js |
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
var FtpDeploy = require('ftp-deploy'); | |
var ftpDeploy = new FtpDeploy(); | |
var config = { | |
username: process.env.FTPUSERNAME, | |
password: process.env.FTPPASS, | |
host: process.env.FTPHOST, | |
port: 21, | |
localRoot: __dirname + "/../dist/", | |
remoteRoot: "/", |
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 { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
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
var emojis = [ | |
'😄','😃','😀','😊','☺','😉','😍','😘','😚','😗','😙','😜','😝','😛','😳','😁','😔','😌','😒','😞','😣','😢','😂','😭','😪','😥','😰','😅','😓','😩','😫','😨','😱','😠','😡','😤','😖','😆','😋','😷','😎','😴','😵','😲','😟','😦','😧','😈','👿','😮','😬','😐','😕','😯','😶','😇','😏','😑','👲','👳','👮','👷','💂','👶','👦','👧','👨','👩','👴','👵','👱','👼','👸','😺','😸','😻','😽','😼','🙀','😿','😹','😾','👹','👺','🙈','🙉','🙊','💀','👽','💩','🔥','✨','🌟','💫','💥','💢','💦','💧','💤','💨','👂','👀','👃','👅','👄','👍','👎','👌','👊','✊','✌','👋','✋','👐','👆','👇','👉','👈','🙌','🙏','☝','👏','💪','🚶','🏃','💃','👫','👪','👬','👭','💏','💑','👯','🙆','🙅','💁','🙋','💆','💇','💅','👰','🙎','🙍','🙇','🎩','👑','👒','👟','👞','👡','👠','👢','👕','👔','👚','👗','🎽','👖','👘','👙','💼','👜','👝','👛','👓','🎀','🌂','💄','💛','💙','💜','💚','❤','💔','💗','💓','💕','💖','💞','💘','💌','💋','💍','💎','👤','👥','💬','👣','💭','🐶','🐺','🐱','🐭','🐹','🐰','🐸','🐯','🐨','🐻','🐷','🐽','🐮','🐗','🐵','🐒','🐴','🐑','🐘','🐼','🐧','🐦','🐤','🐥','🐣','🐔','🐍','🐢','🐛','🐝','🐜','🐞','🐌','🐙','🐚','🐠','🐟','🐬','🐳','🐋','🐄','🐏','🐀','🐃','🐅','🐇','🐉','🐎','🐐','🐓','🐕','🐖','🐁','🐂','🐲','🐡','🐊','🐫','🐪','🐆','🐈','🐩','🐾', |
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
// A common redux pattern when dealing with async functions is to use thunk. | |
// This usually means your action returns a new function instead of an action object, | |
// and the thunk middleware will make it all work. Example: | |
const asyncAction = () => dispatch => setTimeout(() => dispatch(someOtherAction()), 10000); | |
// Now: maybe that async stuff going on is calling some API which you don't want to overload | |
// with request, and that's what debounce is for. | |
// This is an example of a debounced function which will only be calleable once every second. | |
import { debounce } from 'lodash'; | |
const debouncedFn = debounce(() => callApi(), 1000, { leading: true, trailing: false }); |
JavaScript does not bother you too much with types (at first), which is both a blessing and a cure. But we all know the Boolean type. Boolean variables can either be true
or false
. Yes or no.
Every value in JavaScript can be translated into a boolean, true
or false
. Values that translate to true
are truthy, values that translate to false
are falsy. Simple.
This is about two ways to make that translation.
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
OlderNewer