Skip to content

Instantly share code, notes, and snippets.

View rizqirizqi's full-sized avatar
Becoming a star

Mgs. M. Rizqi Fadhlurrahman rizqirizqi

Becoming a star
View GitHub Profile
@pathnirvana
pathnirvana / AsyncJava.js
Last active January 31, 2024 18:15
Async Await call to JavascriptInterface Android Java WebView
// Allows to call a Android java function asynchronously
// spawn long running computations/io on the Java/Android without blocking the JS/Website running inside the WebView
// Eg. const result = await callAndroidAsync('javaFunction', { param1: 'value1', param2: 'value2' })
// Please give a star if you find this useful
export async function callAndroidAsync(javaFuncName, params) {
const rand = 'asyncJava_' + Math.floor(Math.random() * 1000000)
window[rand] = {}
// func called from android
@iscott
iscott / simple_authentication_rails_5_bcrypt_and_has_secure_password.md
Last active May 6, 2024 19:57
Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

Cheat Sheet: Simple Authentication in Rails 6 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

Specs
AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4, 5, or 6
@tzmartin
tzmartin / embedded-file-viewer.md
Last active May 1, 2024 14:41
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@larrybotha
larrybotha / A.markdown
Last active April 2, 2024 14:37
Export multiple artboards in Adobe Illustrator to png, or pdf

Export multiple Adobe Illustrator artboards to png, jpg, pdf

This is a reference to Matthew Ericson's article Export Illustrator Layers and/or Artboards as PNGs and PDFs in case something happens to happen to the article, and if I just forget where to find the exporter online.

Usage

  • Drop MultiExporter.js into /Applications/Adobe\ Illustrator\ CS6/Presets.localized/en_GB/Scripts
  • Restart Illustrator