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
Vue.component('apexchart', () => { | |
// NB: tell webpack to include the dynamic import within | |
// the main bundle instead of splitting into other bundles. | |
// https://webpack.js.org/api/module-methods/#import- | |
return import( | |
/* webpackMode: "eager" */ | |
'vue-apexcharts' | |
) | |
}) |
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
require 'base64' | |
require 'net/http' | |
class ImageProxyController < ActionController::Base | |
def get | |
url = URI.parse(Base64.decode64(params[:url])) | |
image = Net::HTTP.get_response(url) | |
send_data image.body, type: image.content_type, disposition: 'inline' | |
end | |
end |
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
# Some scratch code to get public profile information from Google | |
# based on a list of email addresses. Look at the People Search API | |
# for more details | |
import httplib2 | |
import logging | |
from urllib.parse import urlparse, parse_qs | |
# via https://github.com/google/google-api-python-client | |
from apiclient.discovery import build |
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 datetime | |
import uuid | |
from django.conf import settings | |
from mixpanel import Mixpanel | |
from mixpanel_async import AsyncBufferedConsumer | |
mp = Mixpanel(settings.MIXPANEL_API_TOKEN, consumer=AsyncBufferedConsumer()) |
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 ngError { | |
constructor($parse) { | |
this.$parse = $parse; | |
this.restrict = 'A'; | |
} | |
link(scope, $element, attrs) { | |
var onError = this.$parse(attrs['ngError']); |
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
/** | |
* Create a FAVICON_DIMENSIONxFAVICON_DIMENSION PNG favicon based on the | |
* CSS color of the first NUM_COLORED elements with the class COLORED_CLASS. | |
* The favicon is generated with the pattern: | |
* color 1 | white | |
* color 2 | white | |
* color 3 | white | |
* etc... | |
* | |
*/ |
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
/** | |
* Retrieve all text nodes which are not | |
* made of space characters. | |
* @return {Array} A collection of text nodes | |
**/ | |
var getTextNodes = function() { | |
var walker = document.createTreeWalker( | |
this.rootElement, | |
NodeFilter.SHOW_TEXT, | |
null, |
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
mhyyyyhm | |
hyyyyyyyyh | |
NhyyyyyyyyyyhN | |
NyyyyyyyyyyyyyyN | |
myyyyyyyooyyyyyyym | |
dyyyyyyy+ +yyyyyyyd | |
dyyyyyyy/ /yyyyyyyd | |
hyyyyyyy: :yyyyyyyh | |
Nhyyyyyyy- -syyyyyyhN | |
Nyyyyyyys. .syyyyyyyN |