Skip to content

Instantly share code, notes, and snippets.

View othree's full-sized avatar
:accessibility:
On the way to refactoring

othree othree

:accessibility:
On the way to refactoring
View GitHub Profile
@edokeh
edokeh / index.js
Last active April 18, 2024 08:07
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@joaocunha
joaocunha / How To Hide The Select Arrow On Firefox.md
Last active December 10, 2023 13:05
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
@ArnisL
ArnisL / tmux_24_bit_colours.c
Last active November 2, 2019 18:59
tmux 24 bit colour support
From 9bc0f9402df5155065e4c31eed0e986b700df717 Mon Sep 17 00:00:00 2001
From: Arnis Lapsa <arnis.lapsa@gmail.com>
Date: Fri, 2 Aug 2013 16:15:46 +0300
Subject: [PATCH] 24bit colour support
---
colour.c | 6 ---
input.c | 30 +++++++++++++-
screen-write.c | 85 +++++++++++++++++++++++++++++++++++++-
tmux.h | 11 +++++
diff -r 92c9748e0ccb src/config.h.in
--- a/src/config.h.in Sun Oct 06 17:46:56 2013 +0200
+++ b/src/config.h.in Sun Oct 13 23:11:37 2013 +0200
@@ -442,3 +442,6 @@
/* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/
#undef FEAT_CYGWIN_WIN32_CLIPBOARD
+
+/* Define if we have AvailabilityMacros.h on Mac OS X */
+#undef HAVE_AVAILABILITYMACROS_H
@ihower
ihower / gist:6132576
Last active June 12, 2019 05:42
Git commit without commit
# First commit
echo "hello" | git hash-object -w --stdin
git update-index --add --cacheinfo 100644 ce013625030ba8dba906f756967f9e9ca394464a hello.txt
git write-tree
git commit-tree aaa96c -m "First commit"
git update-ref refs/heads/master 30b060d9a7b5e93c158642b2b6f64b2b758da40d
# Second commit
@josephj
josephj / happy-desinger-mini-1.md
Last active December 18, 2015 10:39
於 HappyDesigner Mini #1 分享會

JavaScript 品質工具:CodePaint 與 Plato

介紹協助提昇 F2E Code Style 的兩個工具。

分享者

josephj@faria

問題

@Haraguroicha
Haraguroicha / upup_ss.js
Last active January 26, 2016 08:22
change custom dimension for up up. ref: http://small-upup.upuptoyou.com/ Note: this is paste and run in DevTools console panel
(function(){
//以下可自行修改,目前可7行且最多14字
var userWidth = 900; //我是寬度
var userHeight = 680; //我是高度
var userWords = ''; //我是預設文字
var userColor = ''; //我是背景色彩
//以下請勿修改
if(location.href.match(/https?:\/\/small-upup\.upuptoyou\.com\/?/) != null) {
$('#words').val(userWords === '' ? 'Modify By:\n腹黒い茶 \nQQQQ QQQQ !!\nQ Q Q Q !!\nQ QQ Q QQ !!\nQQQQ QQQQ\n Q Q !!' : userWords);
@NV
NV / Readme.md
Last active May 28, 2023 20:42
Prepend the debugger statement to a function as easy as stopBefore('Element.prototype.removeChild'). Works in Chrome DevTools and Safari Inspector, doesn’t work in Firebug‘s and Firefox Developer Tools‘ console (I don’t know why). Works as a standalone script everywhere.

stopBefore.js

2min screencast

Examples

stopBefore(document, 'getElementById')
stopBefore('document.getElementById') // the same as the previous
stopBefore(Element.prototype, 'removeChild')

User

  • Appcleaner
  • B1FreeArchiver (unrar)
  • Battery Health
  • BetterTouchTool
  • CCleaner
  • CyberDuck (ftp)
  • DaisyDisk (Disk capacity analyse)
  • Dropbox
@neolee
neolee / primes
Created March 23, 2013 14:15
Lazy primes generator by using a map, a Sieve of Eratosthenes modified by Christophe Grand (co-author of the great book 'Clojure Programming').
(defn primes []
(letfn [(enqueue [sieve n step]
(let [m (+ n step)]
(if (sieve m)
(recur sieve m step)
(assoc sieve m step))))
(next-sieve [sieve candidate]
(if-let [step (sieve candidate)]
(-> sieve
(dissoc candidate)