This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
powercfg -devicequery wake_from_any >> devices.txt | |
for /f "delims=" %%a in (devices.txt) do ( | |
powercfg /devicedisablewake "%%a" | |
) | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2017 mohemohe <[email protected]> | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 無難な対応としては、最初にmastodonを一度停止した方が良いので停止する。 | |
# systemctl stop mastodon-{web,sidekiq,stream} | |
# mastodonユーザー出ない場合は下記のコマンドでmastodonユーザーになる | |
# 一般ユーザーからの場合 | |
# sudo su - mastodon |
NOTE: This is outdated. Check the comments below for more up-to-date forks of this gist.
Improved YARD CHEATSHEET http://yardoc.org
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
NewerOlder