Skip to content

Instantly share code, notes, and snippets.

View supermomonga's full-sized avatar
🏠
Working from home

supermomonga supermomonga

🏠
Working from home
View GitHub Profile
# Rails production setup via SQLite3 made durable by https://litestream.io/
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine.
#
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails
#
# in production you might want to map /data to somewhere on the host,
# but you don't have to!
#
FROM ruby:3.0.2
@nagishin
nagishin / datautility.ipynb
Last active November 27, 2021 13:35
DataUtility.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@echo off
powercfg -devicequery wake_from_any >> devices.txt
for /f "delims=" %%a in (devices.txt) do (
powercfg /devicedisablewake "%%a"
)
pause
@nerdcave
nerdcave / environment.js
Last active May 11, 2021 12:27
PurgeCSS config for Rails 5 and Webpacker (along with Tailwind CSS and Vue.js, in this case)
// first run:
// yarn add glob-all purgecss-webpack-plugin --dev
/*
config/webpack/environment.js
PurgeCSS configuration for Rails 5 + Webpacker + Tailwind CSS + Vue.js
Optionally, put this in production.js if you only want this to apply to production.
For example, your app is large and you want to optimize dev compilation speed.
*/
@tyru
tyru / client.vim
Last active June 17, 2020 14:42
WIP: [Preview] Chrome Debugging Protocol in Vim script
" Run:
" 1. mkdir tmp
" 2. {chrome} --remote-debugging-port=9222 --no-first-run --no-default-browser-check --user-data-dir=tmp
"
" In another shell:
" 1. vim -S client.vim
"
" ref. https://developer.mozilla.org/ja/docs/Tools/Remote_Debugging/Chrome_Desktop
@mohemohe
mohemohe / kokoro.io.js
Last active October 23, 2017 13:03
こぴぺした
function checkUnread() {
const unreadsArray = document.querySelectorAll('.channel_name .badge.pull-right');
let counter = 0;
unreadsArray.forEach((value, index, array) => {
const innterString = value.innerHTML;
const parseData = parseInt(innterString, 10);
if(!isNaN(parseData)) {
counter += parseData;
}
@mohemohe
mohemohe / LICENSE
Last active October 29, 2017 16:19
心.io | require: curl, jq
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2017 mohemohe <mohemohe@ghippos.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@anon5r
anon5r / mastodon-update.sh
Created May 29, 2017 01:45
マストドンのシンプルなアップデート手順。主にさくらのクラウドのスタートアップスクリプトを利用してインストールした場合を想定しています。
#!/bin/sh
# 無難な対応としては、最初にmastodonを一度停止した方が良いので停止する。
# systemctl stop mastodon-{web,sidekiq,stream}
# mastodonユーザー出ない場合は下記のコマンドでmastodonユーザーになる
# 一般ユーザーからの場合
# sudo su - mastodon
@phansch
phansch / yardoc_cheatsheet.md
Last active June 26, 2024 12:23 — forked from chetan/yardoc_cheatsheet.md
Improved YARD cheatsheet