Skip to content

Instantly share code, notes, and snippets.

@yusuke
yusuke / Android Studio30分集中超絶技巧100選メモ DroidKaigi 2018 #DroidKaigi #DroidKaigi_room3
Created February 9, 2018 02:10
Android Studio30分集中超絶技巧100選メモ DroidKaigi 2018 #DroidKaigi #DroidKaigi_room3
Android Studio30分集中超絶技巧100選 DroidKaigi 2018
山本 ユウスケ @yusuke
マウス、トラックパッドを使うのはやめましょう
今日は以下のキーマップの話です
Mac OSX: Mac OSX 10.5+
Windows/Linux: Default
他のキーマップだとQiitaやドキュメント、ブログなどを見る際に苦労します。
設定画面 Cmd + , (Ctrl + Alt + S)
プロジェクト設定画面 Cmd + ;
File > Power Save Modeでバッテリー節約
@hf02
hf02 / DOM3D.user.js
Last active March 28, 2024 18:32 — forked from OrionReed/DOM3D.js
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// ==UserScript==
// @name 3D DOM viewer
// @namespace https://gist.github.com/hf02/2f2fb776ba233fd758af559b9de9e177
// @version 2024-03-27
// @description 3D DOM viewer
// @author OrionReed (forked by hf02)
// @match *://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant GM_registerMenuCommand
// ==/UserScript==
@kuroski
kuroski / camelCase-snake_case-types.ts
Last active March 28, 2024 18:32
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}` ?
@kepano
kepano / obsidian-web-clipper.js
Last active March 28, 2024 18:32
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@cschiewek
cschiewek / x11_docker_mac.md
Last active March 28, 2024 18:31
X11 in docker on macOS

To forward X11 from inside a docker container to a host running macOS

  1. Install XQuartz: https://www.xquartz.org/
  2. Launch XQuartz. Under the XQuartz menu, select Preferences
  3. Go to the security tab and ensure "Allow connections from network clients" is checked.
  4. Run xhost + ${hostname} to allow connections to the macOS host *
  5. Setup a HOSTNAME env var export HOSTNAME=`hostname`*
  6. Add the following to your docker-compose:
 environment:
@chaodonghu
chaodonghu / unfollow-everyone-instagram.js
Last active March 28, 2024 18:30
Google Chrome script that allows user to mass unfollow instagram users on user's profile
// Run GOOGLE CHROME - WORKING AS OF DEC 26 2023
// Please @ me in the comments if this stops working, I will try to get it working again within the month
// INSTRUCTIONS
// 1. Open Instagram in Chrome
// 2. Click on "FOLLOWING" on your Instagram profile
// 3. Open developer tools by right clicking on the page and clicking "INSPECT"
// 4. Copy the code below and paste in the developer tools console and press enter to run
// 5. Script will not run if tab is navigated away from, minimized of unfocused (It is recommended to open a new chrome window or push tab to the side and let script run in background)
@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 18:30
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@TheDruidsKeeper
TheDruidsKeeper / azure-pipelines-build-docker-with-cache.yml
Last active March 28, 2024 18:29
Azure DevOps pipeline with multi-stage docker image layer caching support
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
imageRepository: 'multi-stage-build-caching'
containerRegistry: 'ACR-Service-Connection-Name'
registryName: '[redacted].azurecr.io'

Given a subscribed calendar with a url like

https://example.com/example.ics

To force Google Calendar to refresh and reload the contents right now, unsubscribe from the calendar and subscribe to a new calendar with a URL like

https://example.com/example.ics#1

Adding the anchor tag will force Google Calendar to think of it as a new calendar

@rethink-imcmahon
rethink-imcmahon / ros_image_saver.py
Last active March 28, 2024 18:27
ROS Image Subscriber / JPEG Saver
#! /usr/bin/python
# Copyright (c) 2015, Rethink Robotics, Inc.
# Using this CvBridge Tutorial for converting
# ROS images to OpenCV2 images
# http://wiki.ros.org/cv_bridge/Tutorials/ConvertingBetweenROSImagesAndOpenCVImagesPython
# Using this OpenCV2 tutorial for saving Images:
# http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_gui/py_image_display/py_image_display.html