Skip to content

Instantly share code, notes, and snippets.

@JamieCurnow
JamieCurnow / firestore.ts
Last active April 14, 2024 01:42
Using Firestore with Typescript
/**
* This Gist is part of a medium article - read here:
* https://jamiecurnow.medium.com/using-firestore-with-typescript-65bd2a602945
*/
// import firstore (obviously)
import { firestore } from "firebase-admin"
// Import or define your types
// import { YourType } from '~/@types'
@r-i-c-h
r-i-c-h / tsconfig.json
Created January 30, 2020 20:07
Rich's tsconfig.json
{
"compilerOptions": {
"noImplicitAny": true,
"target": "es5",
"sourceMap": true,
"declaration": true,
"module": "es2015",
"moduleResolution": "node"
},
"exclude": [
@r-i-c-h
r-i-c-h / .prettierrc
Created January 24, 2020 00:28
Rich's .prettierrc
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all"
}
@r-i-c-h
r-i-c-h / .prettierignore
Created January 24, 2020 00:27
Rich's .prettierignore file
build/
node_modules/
package-lock.json
yarn.lock
package.json
*.html
@r-i-c-h
r-i-c-h / my.gitignore
Last active April 22, 2023 00:00
Rich's .gitignore File
# Rich's .gitignore file:
# See https://help.github.com/ignore-files/...
# leading-slash stops recursion, trailing slash = directory/
# >>>Notes <<<<
notes.txt
notes.md
localnotes.md
tutsrc.txt
# >>> Dependency directories <<<
@KaKi87
KaKi87 / awesome-android-x3Free.md
Last active March 22, 2024 07:06
Awesome list — Free, ad-free and in-app-free Android apps

Inspired by Awesome

Awesome

DISCLAIMER : this isn't really an awesome list, I don't care about guidelines, rules and etc. so I don't bother make a real repo and a real pull request.

About this list

This list uses the power of my advanced Google Play search engine to get some free, in-app-free and ad-free apps from it.

@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active April 25, 2024 16:41
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@izy521
izy521 / objectdeepcopy.js
Created July 30, 2016 17:28
`JSON.parse( JSON.stringify( obj) )` has been regarded as the fastest method for deep copying Objects, but is it? This is mainly just to test. Obviously Functions aren't allowed in JSON.
var Types = new Map();
Types.set(Array, function(v) {
var l = v.length; i = 0, a = Array(l);
for (i; i<l; i++) {
a[i] = v[i];
}
return a;
});
Types.set(Number, function(v) {
return v * 1;
@hdragomir
hdragomir / sm-annotated.html
Last active March 5, 2024 08:57
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);