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
juan = 0 | |
gregor = 0 | |
luke = 0 | |
matti = 0 | |
ev = 0 | |
# Ev paid 224.20 lari for the dinner, we divide it equally | |
ev += 224.20 | |
juan -= 44.84 |
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
// focus - focusOptions - preventScroll polyfill | |
const isPreventScrollDefined = () => { | |
let supportsPreventScrollOption = false | |
// 1. Create element | |
const el = document.createElement('div') | |
// 2. Make sure it won't do anything on focus | |
el.addEventListener('focus', (event) => { |
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 TransloaditApi from './TransloaditApi'; | |
const AWS_S3_URL_PREFIX = 'https://memcode.s3.amazonaws.com/'; | |
const onFileDrop = (event) => { | |
const file = event.target.files[0]; | |
// 1. Generate unique AWS S3 path | |
const uniqueAwsS3Path = 'randomFilename.someExtension'; | |
// 2. Create Transloadit assembly |
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 TusJsClient from 'tus-js-client'; | |
const TRANSLOADIT_AUTH_KEY = 'bbbb889ccccc211e984444d105c7e04b7'; | |
const createAssembly = (uniqueAwsS3Path) => { | |
const formData = new FormData(); | |
formData.append('params', JSON.stringify({ | |
auth: { | |
key: TRANSLOADIT_AUTH_KEY | |
}, |
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
SELECT COUNT(MOVIES.ID), MOVIES.DIRECTOR | |
FROM MOVIES | |
GROUP BY MOVIES.DIRECTOR | |
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
/dashboard-modules/1 - |
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
class UserBillingInfo(models.Model): | |
user = models.OneToOneField(User, unique=True) | |
payment_token = models.CharField(max_length = 20) | |
is_current = models.BooleanField(default = False) | |
active_until = models.DateField( default=datetime.now()+timedelta(days=365), null=True, blank=True ) | |
billing_phone = models.DecimalField(default=0, max_digits=12, decimal_places=0) | |
billing_address = models.CharField(max_length = 160) | |
billing_city = models.CharField(max_length = 38) | |
billing_zip = models.PositiveIntegerField(default = 0) | |
billing_state = models.CharField(max_length = 2) |
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
body { | |
position: relative; | |
top: -928px; | |
left: -1076px; | |
color: #373737; | |
font-family: Arial, sans-serif; | |
font-size: 17px; | |
line-height: 24px; | |
max-width: 100%; | |
width: 100% !important; |
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 Player(name){ | |
this.name = name; | |
} | |
Player.prototype.onLoaded = () => {}; | |
Player.prototype.on = function (eventName, callback) { | |
if (eventName === 'loaded') { | |
this.onLoaded = callback; | |
} | |
}; | |
Player.prototype.load = function () { |
NewerOlder