<?php | |
//https://bugs.php.net/bug.php?id=74160 | |
$img = new \Imagick(); | |
$transparent = new \ImagickPixel('#00000000'); | |
$img->readImage($source); | |
$img->transparentPaintImage( | |
$transparent, | |
0.3, | |
10, | |
true |
<?php | |
/** | |
* * * * * "command to be executed" | |
- - - - - | |
| | | | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7) | |
| | | ------- Month (1 - 12) | |
| | --------- Day of month (1 - 31) | |
| ----------- Hour (0 - 23) |
In this gist I will try to connect between OpenSeaDragon and KonvaJS. See history for more details
I have copied OpenSeaDragon's FabricJS plugin implementation in order to create the same plugin for KonvaJS.
Up until now I have only created a working Konva Rect:
.App { | |
text-align: center; | |
} | |
.App-logo { | |
animation: App-logo-spin infinite 20s linear; | |
height: 80px; | |
} | |
.App-header { |
<div id="letters" className="sidebar"> | |
<nav> | |
<ul onTouchMove={(e) => this.handleOnTouchMove(e)}>{allLettersRows}</ul> | |
</nav> | |
</div> | |
handleOnTouchMove(e, a) { | |
e.preventDefault(); | |
console.log('handleOnTouchMove', e.targetTouches[0], a); | |
var letterEl = document.elementFromPoint( |
sleep_2 | |
TheProcess | |
blah answer from http request: hello from http request | |
FB REQUEST: {"object":"page","entry":[{"id":"1637124163250118","time":1510609445717,"messaging":[{"sender":{"id":"1522824674478341"},"recipient":{"id":"1637124163250118"},"timestamp":1510609444865,"message":{"mid":"mid.$cAAXQ9Ib_cmJl6JwoAVft1bfqtwNH","seq":622503,"text":"sleep_2"}}]}]} | |
Shaked | |
sleep_21 | |
TheProcess | |
blah answer from http request: hello from http request |
var mouseMovingLines = { | |
enabled: true, | |
drawn: false, | |
xaxisLine: null, | |
yaxisLine: null, | |
stage: null, | |
layer: null, | |
init: function(stage, layer, options) { | |
this.options = $.extend({ | |
strokeColor: "#fff", |
I have been facing a problem where I got duplicate messages from Messenger's API while developing a chatbot.
I have been looking for a solution and tweeted for help. At the end I got to the following explanation:
Duplicate message postbacks is almost always because fb didn't hear a 200 response and the request ending soon enough. Depending on your language this could be tricky. In php for example not only do you have to respond with 200 ok early, you have to actively clear the buffer and end the connection for fb to receive the response. (Then you can do more processing if needed). Other languages may have something similar.
as mentioned here.
- Run
composer install
- Get crednetials: go to https://console.developers.google.com/apis/credentials and get "OAuth ClientId" credentials.
- Follow instructions below
- Change code as you desire
Example URL: https://spreadsheets.google.com/feeds/cells/1jMe4AJIBBBowXv3WWgLTNcRaPKmAkFF3pc1C7_sib9WAAA/2/public/basic?alt=json