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
export default () => { | |
return new Promise((resolve, reject) => { | |
let imageAddr = | |
"https://nhmisc.s3.amazonaws.com/liswall/stub.jpg" + | |
"?n=" + | |
Math.random(); | |
let startTime, endTime; | |
let downloadSize = 1025385; | |
let download = new Image(); |
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 random from "./randomString"; | |
function getBucketObj() { | |
AWS.config.region = window.aws.region; // 1. Enter your region | |
AWS.config.credentials = new AWS.Credentials(aws.key, aws.secret); | |
AWS.config.credentials.get(function(err) { | |
if (err) alert(err); | |
}); |
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
export default (collectionName, indexName = "selectedIndex", cycle = false) => { | |
return { | |
watch: { | |
[indexName](newValue, oldValue) { | |
if (this[collectionName] === undefined) { | |
return; | |
} | |
let highestIndex = this[collectionName].length - 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
import { createNamespacedHelpers } from "vuex"; | |
import Axios from "axios"; | |
import { getHelperWords, getWordObj } from "../functions/helperWords"; | |
import builderUtils from "../functions/builderUtils"; | |
import randomString from "../functions/randomString"; | |
export default { | |
...createNamespacedHelpers("builder"), | |
namespaced: true, |
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
// Fonts | |
@import url("https://fonts.googleapis.com/css?family=Nunito"); | |
// Variables | |
@import "variables"; | |
@import "keyframes"; | |
@import "animations"; | |
// Bootstrap | |
@import "~bootstrap/scss/bootstrap"; |
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
# Note: Both these requests are being fired by the cloudinary medialibrary js code, not my code. | |
# Works! This is 'copy as curl' from Chrome, where I don't get the 401 error. | |
curl 'https://cloudinary.com/console/api/v1/auth/login_from_session' \ | |
-H 'pragma: no-cache' | |
-H 'cookie: _ga=GA1.2.813819547.1538000561; __utma=136482402.813819547.1538000561.1557868798.1557868798.1; __utmz=136482402.1557868798.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _mkto_trk=id:396-LRB-524&token:_mch-cloudinary.com-1557868798202-41547; intercom-session-f8c4avgs=eU9ZUWlHa3M4SGRKdmMrTjZKU2cvM2FwNkc2blRiaFVoNnFqOHp6OGxVWFBtREo3cFZxOWdCNnNQVnM3cjR2Ry0td2FtY083YVlQY1F1dXQvNXAzRERNQT09--23ea95a8522a7e2e61e0f2a9d427399076fffd0b; new_ml_enabled=yes; _cld_session_key=9a4aad31e7fdfb49e8c2d84aa0058260; _gid=GA1.2.1358471984.1558366586; _gat_UA-25966579-7=1; AWSALB=KOnDJDzN5FvI0QMXbBowU1lYTxi1xdSr8cQEJIDYz2uVPho7FamV++d8iSWr6moSaze+QFXg9Q3s+zK6VB+gL7CIXsU9TGaPImTHfZh9NWD06pHOG4dWJX9hhTl4' | |
-H 'accept-encoding: gzip, deflate, br' \ |
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 | |
Illuminate\Support\Collection::macro('keyByRecursive', function ($func) { | |
return $this->keyBy(function ($value, $key) use ($func) { | |
return $func($value, $key); | |
})->map(function ($item) use ($func) { | |
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
<snippet> | |
<content><![CDATA[ | |
this.${1:func} = this.${1:func}.bind(this); | |
]]></content> | |
<description>Bind class methods in constructor for React components.</description> | |
<tabTrigger>bind</tabTrigger> | |
<scope>source.js</scope> | |
</snippet> |
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
<snippet> | |
<content><![CDATA[ | |
import React, { Component } from "react"; | |
import { | |
View, | |
Text, | |
TouchableWithoutFeedback, | |
Image, | |
Animated | |
} from "react-native"; |
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
<html><head><title>Find String</title></head><body> | |
<?php | |
// ini_set('max_execution_time', '0'); | |
// ini_set('set_time_limit', '0'); | |
find_files('.'); | |
function find_files($seed) { | |
if(! is_dir($seed)) return false; | |
$files = array(); | |
$dirs = array($seed); | |
while(NULL !== ($dir = array_pop($dirs))) |
NewerOlder