Skip to content

Instantly share code, notes, and snippets.

View codesnipers's full-sized avatar
😏
I'll catch your code

nexxer codesnipers

😏
I'll catch your code
View GitHub Profile
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@codesnipers
codesnipers / filterArray.js
Created July 8, 2020 09:10 — forked from jherax/arrayFilterFactory.1.ts
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
@codesnipers
codesnipers / DeCryptor.java
Last active March 9, 2021 15:15 — forked from JosiasSena/DeCryptor.java
Encryptor and Decryptor for data encryption.decryption using the Android KeyStore.
public class DeCryptor {
private static final String TRANSFORMATION = "AES/GCM/NoPadding";
private static final String ANDROID_KEY_STORE = "AndroidKeyStore";
private KeyStore keyStore;
Context context;
DeCryptor(Context context) throws CertificateException, NoSuchAlgorithmException, KeyStoreException,
IOException {
this.context = context;