I hereby claim:
- I am turboza on github.
- I am turboza (https://keybase.io/turboza) on keybase.
- I have a public key ASCKNEVoh1UZMz6lTnEiM7t4819Yo9feslX4TnD28EZGEwo
To claim this, I am signing this object:
<!-- | |
versions available: | |
2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.10.2, 1.10.1, 1.10.0, 1.9.1, 1.9.0, 1.8.3, 1.8.2, 1.8.1, 1.8.0, 1.7.2, 1.7.1, 1.7.0, 1.6.4, 1.6.3, 1.6.2, 1.6.1, 1.6.0, 1.5.2, 1.5.1, 1.5.0, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4.0, 1.3.2, 1.3.1, 1.3.0, 1.2.6, 1.2.3 | |
--> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> |
$.ajax({ | |
url: "example.com/ex.json", | |
type: "get", | |
data: {var1:'value1',var2:'value2'}, | |
dataType:'json', | |
success: function(content){ | |
console.log(content.value); | |
}, | |
error:function(){ | |
console.log('error'); |
<?php | |
// Working code for Laravel 5.2.5 - Fix no $errors return | |
// Error Desc: ErrorException: Undefined variable: errors | |
// REF: https://laracasts.com/discuss/channels/laravel/errorexception-undefined-variable-errors | |
namespace App\Http; |
#define kOFFSET_FOR_KEYBOARD 80.0 | |
-(void)keyboardWillShow { | |
// Animate the current view out of the way | |
if (self.view.frame.origin.y >= 0) | |
{ | |
[self setViewMovedUp:YES]; | |
} | |
else if (self.view.frame.origin.y < 0) | |
{ |
/** | |
* ========================================= | |
* paramSerialize | |
* ========================================= | |
* Serialize JS object into URL Query string format. | |
* | |
* @param {object} params - { a: 10, filters: { x: 2, y: true } } | |
* @return {string} - '?a=10&filters[x]=2&filters[y]=true' | |
*/ | |
export default function paramSerialize(params) { |
/* | |
* This code snippet give an unexpected result because the closure (function inside function) | |
* that will preserve the local variable "i" eventhough buildAction is finished | |
* So every action in array will refer to the same "i" which is 4 after finishing loop. | |
* | |
* Result :( | |
* ``` | |
* "item 4 = undefined" | |
* "item 4 = undefined" | |
* "item 4 = undefined" |
const omise = require('omise')({ | |
secretKey: 'skey_test_...', | |
}); | |
app.post('/pay', function(req, res) { | |
const tokenId = req.body.tokenId, | |
omise.charges.create({ | |
description: 'Charge for order ID: 888', | |
amount: '100000', // 1,000 Baht |
#!/bin/sh | |
find . -name "node_modules" -exec rm -rf '{}' + |
I hereby claim:
To claim this, I am signing this object:
defmodule Experiment do | |
alias SampleApp.{Repo, Order} | |
def run do | |
order = Repo.get(Order, 123) | |
order.status # => "new" | |
# Put status as "pending" while doing some action | |
{:ok, _} = | |
order |