Skip to content

Instantly share code, notes, and snippets.

" IdeaVim Wiki https://github.com/JetBrains/ideavim/wiki
" Find more examples here: https://jb.gg/share-ideavimrc
" The Essential IdeaVim Remaps https://towardsdatascience.com/the-essential-ideavim-remaps-291d4cd3971b
let mapleader=" "
""" Common settings
set showmode
set scrolloff=5
" Do incremental searching.

Hello,

I attended WWDC this year, and overall it was a fantastic experience. I would, however, like to give some feedback on one particular aspect of the conference.

Before I begin, I understand that it would be easy to brush off my feedback as coming from just some grumpy English guy, but I genuinely believe this is important feedback. Please do read until the end.

I would like to ask that the cheering, whooping, clapping and hollering by conference staff is toned down.

I'm a person that would describe myself as "slightly introverted". I cannot begin to describe how deeply uncomfortable it was to walk into the registration room on Sunday to multiple employees cheering and clapping at me, trying to give me high fives. I understand the want to make people excited, but this needs to have its limits. During the conference, I got cheered and high-fived pretty much the entire week for things like:

@razhangwei
razhangwei / presto.md
Last active February 17, 2023 06:51
Presto cheatsheet #Presto #SQL

Table/partition management

  • drop table: drop table table_name
  • rename: ALTER TABLE old_table RENAME TO new_table
  • delete certain partitions: delete from shop_mall_post_attributes where ds <= '2020-06-14';
  • insert rows: INSERT INTO table_name QUERY

Important Topics

  • UDFs
@rharter
rharter / InjectableActivityTestRule.kt
Last active December 6, 2021 12:07
Test Rule that allows you to use Dagger Android's automatic lifecycle based injection without making your Application class `open`, or overriding it in tests.
package com.pixite.pigment.testing
import android.app.Activity
import android.app.Application
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.fragment.app.FragmentManager
@joseluisq
joseluisq / stash_dropped.md
Last active March 28, 2024 11:59
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@kaeawc
kaeawc / codecov.yml
Last active December 20, 2021 13:15
Jacoco settings for multi module multi flavor Kotlin Android app
codecov:
branch: master
bot: null
coverage:
precision: 2
round: down
range: "70...100"
status:
@shotahorii
shotahorii / 20171104_2.md
Last active March 27, 2023 20:53
(un)pivot on Presto

Pivot

Query
SELECT
  uid,
  kv['c1'] AS c1,
  kv['c2'] AS c2,
  kv['c3'] AS c3
FROM (
@cketti
cketti / android-26-sources.md
Last active August 14, 2019 12:08
Build your own android-26 sources

If you are annoyed that "Sources for Android 26" are not yet available via SDK manager, this might be for you:

  1. Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build

mkdir -p frameworks/base
@AndrewReitz
AndrewReitz / ImmutableList.java
Last active December 25, 2018 22:56
Immutable List Stuff
import android.support.annotation.NonNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.RandomAccess;
@mapmeld
mapmeld / OverEncrypt.md
Last active July 25, 2023 18:55
OverEncrypt - paranoid HTTPS

OverEncrypt

This is a guide that I wrote to improve the default security of my website https://fortran.io , which has a certificate from LetsEncrypt. I'm choosing to improve HTTPS security and transparency without consideration for legacy browser support.

WARNING: if you mess up settings, lose your certificates, or decide to no longer maintain HTTPS certs, these steps can and will make your domain inaccessible.

I would recommend these steps only if you have a specific need for information security, privacy, and trust with your users, and/or maintain a separate secure.example.com domain which won't mess up your main site. If you've been thinking about hosting a site on Tor, then this might be a good option, too.

The best resources that I've found for explaining these steps are https://https.cio.gov , https://certificate-transparency.org , and https://twitter.com/konklone