Skip to content

Instantly share code, notes, and snippets.

View calvince's full-sized avatar
:electron:
Talk is cheap. Show me the code

Omonge Calvince calvince

:electron:
Talk is cheap. Show me the code
  • vexla solutions
  • Nairobi,Kenya
View GitHub Profile
@calvince
calvince / .bashrc
Last active May 6, 2025 11:46
make ubuntu terminal look like parrot os terminal. use nano .bashrc from the terminal then replace older baashrc with the new parrot os bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@calvince
calvince / KeyboardVisibilityListener.java
Last active September 14, 2022 21:45
A listener for the soft keyboard on the screen
private IMainActivity mIMainActivity;
static int mAppHeight;
static int currentOrientation = -1;
public void setKeyboardVisibilityListener() {
final View contentView = getActivity().findViewById(android.R.id.content);
contentView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {