Skip to content

Instantly share code, notes, and snippets.

View pt2121's full-sized avatar
👶

Prat pt2121

👶
View GitHub Profile
@pt2121
pt2121 / kitty.conf
Created June 2, 2018 15:48
.config/kitty/kitty.conf
# vim:fileencoding=utf-8:ft=conf
# You can include secondary config files via the "include" directive.
# If you use a relative path for include, it is resolved with respect to the
# location of the current config file. Note that environment variables
# are expanded, so ${USER}.conf becomes name.conf if USER=name
# For example:
# include other.conf
# Fonts {{{
@pt2121
pt2121 / screenshot.hs
Created May 21, 2018 01:34
get a screenshot from an Android device and resize it
#!/usr/bin/env stack
-- stack --resolver lts-10.2 script
{-# LANGUAGE OverloadedStrings #-}
import Turtle
import Control.Monad.IO.Class (MonadIO(..))
import Data.Maybe
@pt2121
pt2121 / keybase.md
Created June 24, 2017 00:50
keybase

Keybase proof

I hereby claim:

  • I am pt2121 on github.
  • I am prat (https://keybase.io/prat) on keybase.
  • I have a public key whose fingerprint is B286 1DD2 DDC2 37B2 317F 9720 B3C7 38B6 3111 CDAB

To claim this, I am signing this object:

@pt2121
pt2121 / layout.xml
Created March 21, 2017 03:05 — forked from kamikat/layout.xml
NestedScrollView + SwipeRefreshLayout + RecyclerView
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
`emacs --daemon` to run in the background.
`emacsclient.emacs24 <filename/dirname>` to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
* Undo - `C-/`
* Redo - `C-?`
* Change case: 1. Camel Case : `M-c`
2. Upper Case : `M-u`
3. Lower Case : `M-l`

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@pt2121
pt2121 / Android Lollipop Widget Tinting Guide
Created April 13, 2016 16:16 — forked from seanKenkeremath/Android Lollipop Widget Tinting Guide
How base colors in Lollipop apply to different UI elements
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
* ripple effect (Lollipop only) -- "colorControlHighlight"
Status Bar:
------------
* background (Lollipop only) - "colorPrimaryDark"
@pt2121
pt2121 / MonoidAtom.scss
Created February 20, 2016 17:04 — forked from larsenwork/MonoidAtom.scss
The code below enables contextual alternates and ligatures but disables them on your `cursor-line` so you don't sacrifice "editability".
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
@pt2121
pt2121 / README.md
Created February 14, 2016 01:41 — forked from bpierre/README.md
Switch To Vim For Good

Switch To Vim For Good

NOTE: This guide has moved to https://github.com/bpierre/switch-to-vim-for-good

This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.

My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.

Original gist with comments: https://gist.github.com/bpierre/0a0025d348b6001394e0