Skip to content

Instantly share code, notes, and snippets.

View askeluv's full-sized avatar
💭
🇸🇬

Alex Svanevik askeluv

💭
🇸🇬
View GitHub Profile
@mhulse
mhulse / Setting up Google Cloud Storage with CORS for Web Fonts.md
Last active August 5, 2023 19:17
Setting up CORS on Google Cloud Storage: An unofficial quick start guide to serving web fonts from Google's cloud. (I'm sure a lot of this info could be improved... Please leave comments if you have tips/improvements.)

Login:

Google Cloud Storage

You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)

When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.

Once verified, you'll have to agree to the terms of service; do that, and click continue.

@jayswan
jayswan / gist:a8d9920ef74516a02fe1
Last active March 11, 2022 15:33
Elasticsearch Python bulk index API example
>>> import itertools
>>> import string
>>> from elasticsearch import Elasticsearch,helpers
es = Elasticsearch()
>>> # k is a generator expression that produces
... # a series of dictionaries containing test data.
... # The test data are just letter permutations
... # created with itertools.permutations.
... #
... # We then reference k as the iterator that's
@jenbennings
jenbennings / index.js
Created April 16, 2018 08:39
Coinbase Commerce to Slack WebHook
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const request = require('request');
admin.initializeApp(functions.config().firebase);
exports.saleAlert = functions.https.onRequest((req, res) => {
const product = req.body.event.data.checkout.id;
const id = req.body.event.data.code;
@gaearon
gaearon / modern_js.md
Last active July 18, 2024 10:37
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@f13end
f13end / Wallet Addresses
Last active June 24, 2024 02:04
List of addresses for major bitcoin and ethereum exchanges
1.Binance
2.Bitfinex
3.Huobi
4.Bitstamp
5.Coincheck
6.Kraken
7.Poloniex
8.Gate.io (Only ETH)
9.Cryptopia (Only ETH)
10.Gemini (Only ETH)