Skip to content

Instantly share code, notes, and snippets.

View dorklord23's full-sized avatar
🏠
Working from home

Tri R.A. Wibowo dorklord23

🏠
Working from home
View GitHub Profile
const admin = require('firebase-admin');
// expects the environment variable GOOGLE_APPLICATION_CREDENTIALS
const serviceAccount = require(process.env.GOOGLE_APPLICATION_CREDENTIALS);
const credential = admin.credential.cert(serviceAccount);
const PROJECT_ID = '<FIREBASE_PROJECT_ID>';
const app = admin.initializeApp({
credential: credential
@te-online
te-online / DeleteButtonWithConfirmation.js
Last active December 17, 2020 17:15 — forked from adylevy/DeleteButtonWithConfirmation.js
react-admin delete button with confirmation
/*
Copyright (c) 2018 Ady Levy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
@adylevy
adylevy / DeleteButtonWithConfirmation.js
Last active May 22, 2021 11:46
react-admin delete button with confirmation
/*
Copyright (c) 2018 Ady Levy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@nikhita
nikhita / update-golang.md
Last active July 19, 2024 17:55
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@speier
speier / clock.js
Created October 24, 2013 19:58
dead simple js clock (using moment.js)
function displayTime() {
var time = moment().format('HH:mm:ss');
$('#clock').html(time);
setTimeout(displayTime, 1000);
}
$(document).ready(function() {
displayTime();
});