Skip to content

Instantly share code, notes, and snippets.

View eightpigs's full-sized avatar
🙃
I may be slow to respond.

eightpigs eightpigs

🙃
I may be slow to respond.
View GitHub Profile
@RobertAudi
RobertAudi / ideavimrc
Created July 28, 2014 08:46
System clipboard support in IdeaVim
nnoremap yy "+yy
vnoremap y "+y
nnoremap p "+p
vnoremap p "+p
nnoremap P "+P
vnoremap P "+P
@97-109-107
97-109-107 / i3-get-current-screen.py
Last active September 19, 2019 15:46
get the size of current screen in i3wm
#!/usr/bin/env python
import i3
def getCurrentScreen():
workspace = [ws for ws in i3.get_workspaces() if ws['focused']][0]
screen_w =str(workspace['rect']['width'])
screen_h =str(workspace['rect']['height'])
print(screen_w, screen_h);
@zacwest
zacwest / ios-font-sizes.swift
Last active September 25, 2025 07:59
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 17
.extraLargeTitle, .extraLargeTitle2,
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]
@85degree
85degree / updateip.lua
Created February 13, 2016 21:18
CloudFlare Dynamic DNS using OpenWRT
#!/usr/bin/lua
-- Original script: https://github.com/nileshgr/utilities/blob/master/general/updateip.lua
-- http://nileshgr.com/2015/09/23/cloudflare-dynamic-dns-using-openwrt
-- For use with openwrt since openwrt supports LUA.
-- Prerequisites:
-- luasec
-- luasocket
-- libubus-lua
@sivartravis
sivartravis / a-wysiwyg-rich-text-editor-with-contenteditable-attribute.markdown
Created March 10, 2017 16:00
A WYSIWYG Rich Text Editor with contentEditable attribute
@stav121
stav121 / polybar-config
Created January 3, 2019 00:57
Transparent Polybar Config
[colors]
background = #1d1f2110
background-alt = #282a2e
foreground = #1d1f21
foreground-alt = #1d1f21
[bar/main_bar]
width = 100%
height = 27
;offset-x = 1%
local function Chinese()
-- 简体拼音
hs.keycodes.currentSourceID("com.apple.inputmethod.SCIM.ITABC")
end
local function English()
-- ABC
hs.keycodes.currentSourceID("com.apple.keylayout.ABC")
end
@lihongjie0209
lihongjie0209 / PoJoGen.groovy
Last active December 4, 2019 12:11
根据Jetbrain IDE 的数据库查询工具得到的结果生成Java Bean
/*
* Available context bindings:
* COLUMNS List<DataColumn>
* ROWS Iterable<DataRow>
* OUT { append() }
* FORMATTER { format(row, col); formatValue(Object, col) }
* TRANSPOSED Boolean
* plus ALL_COLUMNS, TABLE, DIALECT
*
* where:
{
"PD-KB401W": {
"typeNumber": "PD-KB401W",
"layoutType": 1,
"colorType": 0,
"series": 0,
"layoutTypeName": 1,
"postfix": "",
"isKeymapChangeable": true,
"firmTypeNumber": "AHHX01",
@arcadefire
arcadefire / bottomsheet.kt
Created September 12, 2021 12:50
Bottom sheet
enum class States {
EXPANDED,
COLLAPSED
}
@ExperimentalMaterialApi
@Composable
fun FullHeightBottomSheet(
header: @Composable () -> Unit,
body: @Composable () -> Unit