Skip to content

Instantly share code, notes, and snippets.

View ifsc01's full-sized avatar
Focusing

ifsc01 ifsc01

Focusing
View GitHub Profile
@lazaronixon
lazaronixon / dropzone_controller.js
Last active March 9, 2024 05:14
Dropzone.js + Stimulus + Active Storage
import { Controller } from "stimulus"
import { DirectUpload } from "@rails/activestorage"
import Dropzone from "dropzone"
import { getMetaValue, findElement, removeElement, insertAfter } from "helpers"
Dropzone.autoDiscover = false
export default class extends Controller {
static targets = [ "input" ]
@julianrubisch
julianrubisch / Gemfile
Last active September 13, 2019 16:39
Hooking up Dropzone.js with ActiveStorage DirectUpload via Stimulus.js
source 'https://rails-assets.org' do
gem 'rails-assets-dropzone'
end
@mrmartineau
mrmartineau / stimulus.md
Last active April 19, 2024 09:41
Stimulus cheatsheet
@wd
wd / config.json
Last active August 19, 2023 22:23
路由器梅林固件上面使用 v2ray 的方案
{
"log": {
"loglevel": "none"
},
"inbound": {
"port": 23456,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
@turtlemonvh
turtlemonvh / Makefile
Last active January 23, 2024 03:33
Golang Project Makefile Template
# Borrowed from:
# https://github.com/silven/go-example/blob/master/Makefile
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/
BINARY = superdo
VET_REPORT = vet.report
TEST_REPORT = tests.xml
GOARCH = amd64
VERSION?=?
@tlikai
tlikai / export_mysql_table_schema_to_markdown_table.php
Last active October 1, 2020 01:07
export mysql table schema to markdown table
#!/usr/bin/env php
<?php
if (count($argv) == 1) {
throw new InvalidArgumentException('Missing tables');
}
$tables = array_slice($argv, 1);
$db = new PDO('mysql:dbname=uniqueway_development;host=127.0.0.1;charset=utf8mb4', 'root', '');