fabric.TextboxWithPadding = fabric.util.createClass(fabric.Textbox, {
type: 'textboxwithpadding',
toObject: function() {
return fabric.util.object.extend(this.callSuper('toObject'), {
backgroundColor: this.get('backgroundColor'),
padding: this.get('padding'),
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
// code courtesy of Toby team | |
chrome.storage.local.get("state", o => ( | |
((f, t) => { | |
let e = document.createElement("a"); | |
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`); | |
e.setAttribute("download", f); | |
e.click(); | |
})(`TobyBackup${Date.now()}.json`, o.state) | |
)); |
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
# python 3 | |
# a review of Python’s dictionary format | |
# create a new dict - named session - with three key:value pairs: | |
session = { 'logged_in': True, 'user': 'Harry Potter', 'password': 'parseltongue' } | |
# create a new dict - named session2 - with three key:value pairs | |
# another way to create a dict) | |
session2 = {} | |
session2['logged_in'] = False |
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
<?php | |
/** | |
* Send a Message to a Slack Channel. | |
* | |
* In order to get the API Token visit: | |
* | |
* 1.) Create an APP -> https://api.slack.com/apps/ | |
* 2.) See menu entry "Install App" | |
* 3.) Use the "Bot User OAuth Token" |
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 tweepy | |
import os | |
# Consumer keys and access tokens, used for OAuth | |
consumer_key = '' | |
consumer_secret = '' | |
access_token = '' | |
access_token_secret = '' | |
# OAuth process, using the keys and tokens |
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
(function(){ | |
'use strict'; | |
$('[data-slider]').each(function(){ | |
function d(a,b){ | |
return parseFloat(a.attr(b) || a.attr('data-'+b)); | |
} | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta name="description" content="Webpage description goes here" /> | |
<meta charset="utf-8"> | |
<title>Change_me</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="author" content=""> | |
<link rel="stylesheet" href="css/style.css"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Blank HTML5</title> | |
<style> | |
</style> | |
</head> | |
<body> |
NewerOlder