Skip to content

Instantly share code, notes, and snippets.

View indrasantosa's full-sized avatar

Indra Santosa indrasantosa

View GitHub Profile
@indrasantosa
indrasantosa / testing.js
Created May 6, 2024 09:33
public thing
document.dispatchEvent(new CustomEvent('MyInjectedEvent', { detail: window.layoutService }));
@indrasantosa
indrasantosa / match_check.sh
Last active October 26, 2021 03:38
Verify a certificate match the private key
# Perform
openssl x509 -noout -modulus -in cert.crt | openssl md5
openssl rsa -noout -modulus -in privkey.txt | openssl md5
@indrasantosa
indrasantosa / lerna_basic.md
Created October 2, 2019 09:24
Lerna Basics

Lerna Cheat Sheet

Documentation

https://github.com/lerna/lerna

Basic commands

lerna init --independent - create lerna file. Flag independent defines if all packages should be versioned separatly.

lerna bootstrap --<flags> - runs npm i && npm run prepare on all packages

@indrasantosa
indrasantosa / media-query.css
Created April 27, 2019 12:07 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@indrasantosa
indrasantosa / osx-disabling-gpg-for-commits.sh
Created December 17, 2018 06:01 — forked from bhrott/osx-disabling-gpg-for-commits.sh
OSX: disabling gpg for commits
!#/bin/bash
git config --global commit.gpgsign false
@indrasantosa
indrasantosa / loopback-auto-update-structure.js
Created April 21, 2017 03:41
Loopback boot scripts to update the table based on json model definition, the name of the table should be speci
var glob = require('glob');
var path = require('path');
module.exports = function(app) {
var ds = app.dataSources['automailer-db']
var files = glob.sync(path.join(__dirname, '..', '..', '/common/models/*.json'))
files.forEach(function(file) {
var modelDefinition = require(file)
@indrasantosa
indrasantosa / 0_reuse_code.js
Created November 7, 2016 19:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@indrasantosa
indrasantosa / gist:86df6ea8ab7ab9cdcb5cd1843e3693f7
Created November 7, 2016 18:29 — forked from kinopyo/gist:2343176
Override Devise RegistrationsController, override redirect path after updating user

Override Devise RegistrationsController

Overview

Here I'll show you

  • How to override devise registrations_controller(related to create/update user account)
  • How to change redirect path after updating user

Override RegistrationsController

@indrasantosa
indrasantosa / headless.md
Created October 24, 2016 02:56 — forked from addyosmani/headless.md
So, you want to run Chrome headless.
# Make sure you have python and virtualenv installed
# You can refer to this gist https://gist.github.com/indrasantosa/521c890b4f82d30365f77e109c51b39e
# Install dependencies
sudo apt-get install build-essential libssl-dev libffi-dev python-dev libgmp3-dev libpq-dev python-dev
sudo pip install cryptography pyopenssl ndg-httpsclient pyasn1
# Download and install pgadmin
wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/pip/pgadmin4-1.0-py2-none-any.whl
pip install pgadmin4-1.0-py2-none-any.whl