This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.local/share/nvim/plugged') | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'ervandew/supertab' | |
Plug 'xolox/vim-misc' | |
Plug 'xolox/vim-session' | |
Plug 'padde/jump.vim' | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'dracula/vim', { 'as': 'dracula' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redis-cli --scan --partten "keys:*" | xargs redis-cli del |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIColor { | |
class func hexColor(hex: Int, alpha: Double = 1) -> UIColor { | |
let red = Double((hex & 0xFF0000) >> 16) / 255.0 | |
let green = Double((hex & 0xFF00) >> 8) / 255.0 | |
let blue = Double((hex & 0xFF)) / 255.0 | |
return UIColor(red: CGFloat(red), green: CGFloat(green), blue: CGFloat(blue), alpha: CGFloat(alpha) ) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Student> retList = gson.fromJson(s2, | |
new TypeToken<List<Student>>() { | |
}.getType()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style name="AppTheme" parent="android:Theme.Holo.Light"> | |
<item name="android:windowActionBar">false</item> | |
<item name="android:windowNoTitle">true</item> | |
<item name="android:windowContentOverlay">@null</item> | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun viper-escape-if-next-char (c) | |
"Watches the next letter. If c, then switch to viper mode, otherwise insert a j and forward unpressed key to unread-command-events" | |
(self-insert-command 1) | |
(let ((next-key (read-event))) | |
(if (= c next-key) | |
(progn | |
(delete-backward-char 1) | |
(viper-mode)) | |
(setq unread-command-events (list next-key))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Application theme. --> | |
<style name="MyTheme" parent="@android:style/Theme.Holo"> | |
<item name="android:windowActionBarOverlay">true</item> | |
<item name="android:actionBarStyle">@style/MyTheme.ActionBar</item> | |
<item name="android:windowContentOverlay">@null</item> | |
<item name="android:windowBackground">@color/red_background</item> | |
</style> | |
<style name="MyTheme.ActionBar" parent="android:Widget.Holo.ActionBar"> | |
<item name="android:background">@android:color/transparent</item> | |
<item name="android:backgroundStacked">@android:color/transparent</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Pre-requisites | |
sudo apt-get -y update | |
sudo apt-get --no-install-recommends -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev vim | |
# Download and compile Ruby 2.1.2 | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | |
tar -xvzf ruby-2.1.2.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.graphics.Bitmap; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.BitmapShader; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.graphics.Shader; | |
// enables hardware accelerated rounded corners | |
// original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/ |
NewerOlder