Skip to content

Instantly share code, notes, and snippets.

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active June 1, 2024 19:40
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@sub-mod
sub-mod / crc_remote_laptop.md
Last active July 9, 2022 12:03
Setup CodeReady Containers on Remote Server and connect from Laptop 4.2

Following steps work for F29 for F31 look here

On the remote host

cat /etc/redhat-release
Fedora release 29 (Twenty Nine)

Install packages

@alan-rodriguez
alan-rodriguez / CodeJam.md
Created October 18, 2017 22:31
Kotlin Code Jam Exercise

Kotlin Code Jam

If you're familiar with Material Design, you've probably seen Chris Banes's Cheesesquare sample app. It illustrates the implementation of basic Material Design concepts using Material Components for Android (formerly known as the Design Support Library).

Convert Cheesesquare to Kotlin

Download Android Studio 3.0 and use the wizard to create a new Android project. Be sure to select "Include Kotlin Support"! Then try to port the Cheesesquare app to Kotlin. I suggest trying to do so from scratch on your own, but you can use Android Studio to convert Java code to Kotlin. It does not always result in the most idiomatic Kotlin, so check the output and try to make it more idiomatic.

Bonus: Use Bottom Navigation

Get rid of the Navigation Drawer and use BottomNavigationView to handle the navigation in MainActivity.

@aparrish
aparrish / word_counts_with_counter.ipynb
Last active October 23, 2020 10:33
Quick word counts with Counter. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aparrish
aparrish / spacy_intro.ipynb
Last active August 9, 2023 01:41
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danybony
danybony / RainbowLightsActivity.java
Created December 28, 2016 23:47
Android Things sample activity showing how to read and toggle some LEDs in response
public class RainbowLightsActivity extends Activity {
private static final String TAG = RainbowLightsActivity.class.getSimpleName();
private List<Gpio> buttons = new ArrayList<>();
private Map<Color, Gpio> leds = new HashMap<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@FrancoisBlavoet
FrancoisBlavoet / GammaEvaluator.java
Last active November 17, 2020 07:03
Correct color interpolation
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import static java.lang.Math.pow;
public class GammaEvaluator implements TypeEvaluator {
private static final GammaEvaluator instance = new GammaEvaluator();
/**
@tir38
tir38 / build.gradle
Last active October 7, 2016 06:00
How to document your dependency list
dependencies {
compile project(':core')
// Parser for scanRecord byte array returned from
// android.bluetooth.BluetoothAdapter.LeScanCallback.onLeScan()
// This is only needed for pre-Lollipop devices.
// https://github.com/TakahikoKawasaki/nv-bluetooth
// Apache 2.0
compile 'com.neovisionaries:nv-bluetooth:1.7'
@liberorignanese
liberorignanese / MarginSpan.java
Last active January 12, 2024 18:05
Android TextInputLayout with credit card mask
package com.liberorignanese.android.gist;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.text.style.ReplacementSpan;
/**
* Created by Libero Rignanese.
*/
@kkuivi
kkuivi / gist:d49d7d832013b2b15e28cf20706a013a
Last active January 17, 2017 15:09
ReferenceMap- Datastructure that makes it possible to pass objects between activities for Android development.
package com.goeshow.barcodescanner.utils.objectReferenceMap;
import android.content.Context;
import android.support.v4.app.Fragment;
import java.util.HashMap;
/**
* Created by ekuivi on 8/24/16.
*