I hereby claim:
- I am jar-o on github.
- I am jarobson (https://keybase.io/jarobson) on keybase.
- I have a public key whose fingerprint is 5967 9910 54FA A42E B82F 480A CCA6 11BB 4974 1C62
To claim this, I am signing this object:
=pod | |
Put this is in the module in which you want to see SQL: | |
use DBIxOut; | |
my $dbout = DBIxOut->new(); | |
$dbout->enable_from_rs($resultset); | |
# OR | |
I hereby claim:
To claim this, I am signing this object:
package A::Moose::Role::ToSql; | |
use Moose::Role; | |
use JSON; | |
sub sql_table { | |
my $self = shift; | |
my %ok_types = ( | |
Str => 'character varying(255)', | |
Int => 'integer', |
###### For submission to https://leetcode.com/problems/maximal-square/ | |
class Solution(object): | |
def maximalSquare(self, matrix): | |
# handle 0 and 1 dimensional arrays | |
if len(matrix) == 0: return 0 | |
if len(matrix) == 1: | |
for i in range(len(matrix[0])): | |
if matrix[0][i] == '1': return 1 |
/* | |
# This werks in OSX ... need to build the C deps locally, then run your go app | |
# with the appropriate CGO* flags. | |
http://www.imagemagick.org/download/releases/ImageMagick-7.0.6-10.tar.xz | |
tar xvzf ImageMagick-7.0.6-10.tar.xz | |
cd ImageMagick-7.0.6-10 | |
mkdir dist | |
export CGO_IMAGEMAGICK_PREFIX=`pwd`/dist |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf8" /> | |
<title>ReDoc documentation</title> | |
<!-- needed for adaptive design --> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
body { |
I hereby claim:
To claim this, I am signing this object:
const Web3 = require('web3') | |
var utils = require('ethereumjs-util'); | |
const provider = new Web3.providers.HttpProvider('http://localhost:8545') | |
const web3 = new Web3(provider) | |
const dorecover = async function(){ | |
// Recover using account from ganache-cli | |
var accounts = await web3.eth.getAccounts() | |
let msg = 'I shill your promotion' |
contract Converter { | |
function u256a_tobytes(uint256[] memory arr) public pure returns (bytes memory) { | |
bytes memory b = new bytes(arr.length*32); | |
for (uint256 i = 0; i < arr.length; i++) { | |
uint256 x = arr[i]; | |
uint256 j = 32+(i*32); | |
assembly { | |
mstore(add(b, j), x) | |
} | |
} |
#!/usr/bin/env bash | |
{ # Prevent execution if this script was only partially downloaded | |
set -e | |
tmpfile=$(mktemp) | |
trap 'rm $tmpfile' EXIT | |
cat > "$tmpfile" <<'EOF' | |
GREEN='\033[0;32m' |