Skip to content

Instantly share code, notes, and snippets.

View sakamossan's full-sized avatar

sakamossan sakamossan

View GitHub Profile
@digitalronin
digitalronin / gist:9a0258d6b182f647e5d7
Created August 1, 2015 11:25
Bash script to reload the current Chrome (or Safari) browser window
#!/bin/bash
/usr/bin/osascript <<EOF
tell application "Google Chrome"
set docUrl to URL of (active tab of window 1)
set URL of (active tab of window 1) to docUrl
end tell
EOF
# /usr/bin/osascript <<EOF
@mono0926
mono0926 / commit_message_example.md
Last active July 27, 2024 05:46
[転載] gitにおけるコミットログ/メッセージ例文集100
@mugifly
mugifly / switchbot-cmd.md
Last active February 10, 2022 23:58
Simplest Switchbot Command

switchbot-cmd.py

Simplest Switchbot Command

Installation

It tested on Raspberry Pi Zero W with Raspbian Stretch.

$ sudo apt-get install python-pip libglib2.0-dev bluez-tools
$ sudo pip install bluepy
@titulus
titulus / cookiesParser.js
Last active January 20, 2024 02:00
parse cookies.txt into array of object used by puppeteer
const fs = require('fs');
const file = fs.readFileSync('./cookies.txt', 'utf8');
const cookies = file
.split('\n')
.map(line => line2object(''+line))
.filter(notNull => notNull);
module.exports = cookies;
@brucebentley
brucebentley / iOS Shortcuts Catalog.md
Last active July 19, 2024 07:33
This is a public resource designed to help people get started with Siri Shortcuts & the Shortcuts app. It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Bruce's iOS Shortcut Catalog

Hello and welcome to my Shortcuts Catalog!

This is a public resource designed to help people get started with Siri Shortcuts and the Shortcuts app.

It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Enjoy!

@kuroski
kuroski / camelCase-snake_case-types.ts
Last active June 13, 2024 04:39
Typescript type camelCase / snake_case conversion
type CamelCase<S extends string> = S extends `${infer P1}_${infer P2}${infer P3}`
? `${Lowercase<P1>}${Uppercase<P2>}${CamelCase<P3>}`
: Lowercase<S>
type KeysToCamelCase<T> = {
[K in keyof T as CamelCase<string & K>]: T[K]
}
type CamelToSnakeCase<S extends string> = S extends `${infer T}${infer U}` ?