Skip to content

Instantly share code, notes, and snippets.

View luke10x's full-sized avatar

Luke 10X luke10x

View GitHub Profile
@doublejosh
doublejosh / Wrapper.tsx
Created May 5, 2020 20:04
Typescript + MUI + Styled
const MyComponent: React.FC<{ theme: MyTheme }> = styled(({ theme, ...props }) => <Box {...props} />)`
&& {
text-align: center;
padding-top: ${props => props.theme.spacing(2)}px;
}
`
export const Wrapper: React.FC<WrapperProps> = ({ ...props }) => {
const theme: MyTheme = useTheme()
return (
@sylt
sylt / ncurses_mouse_movement.c
Created November 22, 2015 20:17
Mouse movement example for NCURSES
// I had problems getting mouse movement events working in ncurses, but after
// some research, it seems as if this is how you can do it. The magic is in the
// printf("\033[?1003h\n") which was the missing piece in the puzzle for me
// (see console_codes(4) for more information). 1003 means here that all events
// (even position updates) will be reported.
//
// This seems to work in at least three X-based terminals that I've tested:
// xterm, urxvt and gnome-terminal. It doesn't work when testing in a "normal"
// terminal, with GPM enabled. Perhaps something for the next gist version? :)