Skip to content

Instantly share code, notes, and snippets.

View mirzalazuardi's full-sized avatar
🙃

Mirzalazuardi Hermawan mirzalazuardi

🙃
View GitHub Profile
@mirzalazuardi
mirzalazuardi / README.md
Created October 31, 2023 05:07 — forked from equivalent/README.md
Rails 7 importmaps dropzone.js direct upload ActiveStorage

This is simple implementation of technologies in hobby project of mine built in Rails7 where I need direct upload to S3.

@sbounmy
sbounmy / .env.production
Last active March 31, 2024 09:38
Files to deploy Rails 7 app with Kamal
KAMAL_REGISTRY_PASSWORD=xxx
RAILS_MASTER_KEY=xxxxxxxxxxxxxxx
POSTGRES_PASSWORD=xxxxxxxxxxxxx
REDIS_PASSWORD=my-redis-password
REDIS_URL=redis://:my-redis-password@n28-redis:6379/1
@equivalent
equivalent / README.md
Last active April 8, 2024 03:00
Rails 7 importmaps dropzone.js direct upload ActiveStorage

This is simple implementation of technologies in hobby project of mine built in Rails7 where I need direct upload to S3.

@dhamkur
dhamkur / Basic trello access authorization
Last active February 14, 2022 03:33
basic-trello-access-attachment.txt
How to get your key?
- https://trello.com/app-key
- Copy developer api key
How to get your token?
- https://trello.com/1/authorize?expiration=1day&name=MyPersonalToken&scope=read&response_type=token&key={YourAPIKey}
curl -H "Authorization: OAuth oauth_consumer_key=\"yourKey\", oauth_token=\"yourToken\"" "https://api.trello.com/1/cards/idCard/attachments/idAttachment/download/namefile.jpg" --output "namefile.jpg"
curl -H "Authorization: OAuth oauth_consumer_key=\"yourKey\", oauth_token=\"yourToken\"" "https://api.trello.com/1/members/me"
app/assets/javascripts/custom.js
$(document).ready(function() {
let arraySelect2 = [".select2-yourvarname"]
function select2Dynamic(name) {
let id = $(name).attr("data-id")
let text = $(name).attr("data-name")
$(name).select2({
placeholder: "Select Data",
@jeromescuggs
jeromescuggs / gist:548cc7bf3accc277d427fa263720957f
Created November 9, 2020 21:26
flawless WSL compatibility with X servers (x410, VcXsrv etc) for .zshrc
# WSL1 compatibility with X server (x410, others should work)
if [[ "$(</proc/version)" == *Microsoft* ]] 2>/dev/null; then
export WSL=1
export DISPLAY=localhost:0
export NO_AT_BRIDGE=1
export LIBGL_ALWAYS_INDIRECT=1
fi
# WSL2 compatibility
if [[ "$(</proc/version)" == *microsoft* ]] 2>/dev/null; then
@alistairtweed
alistairtweed / .rspec
Last active May 9, 2024 22:02
Testing Rails with RSpec, Factory Bot, Faker and Shoulda Matchers
--require spec_helper
@kdamsmt
kdamsmt / Balsamiq Mockups 3.5.17
Last active March 5, 2024 13:28
Balsamiq Mockups 3.5.17 for Desktop full license key (Tested) or Balsamiq Wireframes for Desktop
Balsamiq Wireframes for Desktop full license key free
This old name is Balsamiq Mockups now the company changing the name to Balsamiq Wireframes for Desktop insteed
HOW TO:
First download softwere here: https://balsamiq.com/wireframes/desktop/
Install and follow screen direction
Use below serial:
=====================================================================================
@AjkayAlan
AjkayAlan / WSLWindows10Setup.md
Last active April 29, 2024 15:43
Windows SubSystem For Linux setup that I like with some developers stuff mixed in

Setting Up WSL

Install A Distro:

  1. Run the following in powershell as admin Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  2. Install a distro (ex: Ubuntu 18.04 LTS - https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)

  3. Open your distro you installed via the start menu, let it setup

  4. Update and upgrade

sudo apt-get update