Skip to content

Instantly share code, notes, and snippets.

Anthony crazytonyi

Block or report user

Report or block crazytonyi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View checkerboard.js
class CheckerboardPainter {
paint(ctx, geom, properties) {
// Use `ctx` as if it was a normal canvas
const colors = ['red', 'green', 'blue'];
const size = 32;
for(let y = 0; y < geom.height/size; y++) {
for(let x = 0; x < geom.width/size; x++) {
const color = colors[(x + y) % colors.length];
ctx.fillStyle = color;
View US_States.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View GuzzleTest6.php
$client = new \GuzzleHttp\Client();
$headers = ['x-api-key' => 'MY API KEY'];
$options = [
'headers' => ['x-api-key' => 'MY API KEY'],
'debug' => true,
View GuzzleTest.php
$client = new \GuzzleHttp\Client();
$request = $client->createRequest('GET', '');
$request->addHeader('x-api-key', 'MY API KEY');
try {
$resp = $client->send($request);
} catch (GuzzleHttp\Exception\ClientException $e) {
$resp = $e->getResponse();
crazytonyi / mass_update_leads.php
Last active Apr 21, 2017
Basic Example of API for MassUpdate
View mass_update_leads.php
function getAccessToken($instance_url, $username, $password)
echo "Authenticating..." . PHP_EOL;
$auth_url = $instance_url . "/oauth2/token";
$oauth2_token_arguments = array(
"grant_type" => "password",
crazytonyi / saveFilev2.html
Last active Apr 6, 2019
HTML Self-Replicating Script with Live textarea content
View saveFilev2.html
<!doctype html>
<!-- saveFile.html 1.0.0 2015 guest271314 edit, save `html` document -->
<button>save file</button>
<script type="text/javascript">
var saveFile = document.getElementsByTagName("button")[0];
View test.adoc

Test 1 — \'Twas the night before Christmas and my glasses' arm was broken. 'Til I get them fixed, I can’t see.

Test 2 — 'Til I get them fixed, I can’t see.

Test 3 — 'Til I get the 'other' pair, I can’t see.

Test 4 — `x’Til I get the 'other' pair, I can’t see.

You can’t perform that action at this time.