Skip to content

Instantly share code, notes, and snippets.

View OleksandrKucherenko's full-sized avatar

Oleksandr OleksandrKucherenko

View GitHub Profile
@ishu3101
ishu3101 / gist_to_github_repo.md
Created November 24, 2015 08:35
Transfer a gist to a GitHub repository

Transfer a gist to a GitHub repository

clone the gist

git clone https://gist.github.com/ishu3101/6fb35afd237e42ef25f9

rename the directory

mv 6fb35afd237e42ef25f9 ConvertTo-Markdown

change the working directory to the newly renamed directory

cd ConvertTo-Markdown

@OleksandrKucherenko
OleksandrKucherenko / JsonLoader.java
Last active March 23, 2018 06:20
Volley Library adaptation for Loader pattern.
import android.os.Handler;
import android.os.Message;
import android.support.v4.content.Loader;
import com.android.volley.NoConnectionError;
import com.android.volley.Response;
import com.android.volley.RetryPolicy;
import com.android.volley.TimeoutError;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonRequest;
@avbk
avbk / robo.md
Last active October 14, 2017 00:16
Testing with Robolectric within Android Studio

Testing with Robolectric within Android Studio

Prerequisites

0. Setup a project

Setup a new Android project with Android Studio. If you already have done this you can skip this step.

@anthavio
anthavio / jstatd
Last active January 14, 2016 13:09
jstatd /etc/init.d script
#!/bin/sh
# chkconfig: 345 99 05
# description: Java jstatd utility
# Install
# /etc/init.d/jstatd
# chkconfig --add jstatd
# Optional variables:
# JAVA_HOME, JPS_BIN, JSTATD_BIN, JSTATD_PORT, POLICY_FILE
# JPS_APP_ID, JVM_START_LOG, START_TIMEOUT, STOP_TIMEOUT, TIME_STEP
@chrismccoy
chrismccoy / gitcheats.txt
Last active April 20, 2024 08:50
git cheats
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# edit all commit messages
git rebase -i --root
# clone all your repos with gh cli tool
gh repo list --json name -q '.[].name' | xargs -n1 gh repo clone
@sgergely
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name