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 / Ubuntu.sh
Last active October 29, 2016 18:30
Docker installation
# Prepare dependencies
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
# Add new GPG Key
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# Open the /etc/apt/sources.list.d/docker.list file in your favorite editor.
# If the file doesn’t exist, create it.
@indrasantosa
indrasantosa / headless.md
Created October 24, 2016 02:56 — forked from addyosmani/headless.md
So, you want to run Chrome headless.