$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"
# Create a directory | |
mkdir ~/tmux-install | |
cd ~/tmux-install | |
# Get the files | |
curl -OL http://downloads.sourceforge.net/tmux/tmux-1.5.tar.gz | |
curl -OL http://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.16-stable.tar.gz | |
# Extract them | |
tar xzf tmux-1.5.tar.gz |
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"net/mail" | |
"net/smtp" | |
"crypto/tls" | |
) |
Let's say the plugin is at a GitHub URL https://github.com/manasthakur/foo
.
First get the plugin by either cloning it (git clone https://github.com/manasthakur.foo.git
) or simply downloading it as a zip (from its GitHub page).
Adding a plugin in Vim is equivalent to adding the plugin's code properly into its runtimepath (includes the $HOME/.vim
directory by default).
For example, if the layout of a plugin foo
is as follows:
foo/autoload/foo.vim
foo/plugin/foo.vim
"A phantom type is a parametrised type whose parameters do not all appear on the right-hand side of its definition..." Haskell Wiki, PhantomType
The following write-up is intended as an introduction into using phantom types in ReasonML.
Taking a look at the above definition from the Haskell wiki, it states that phantom types are parametrised types where not all parameters appear on the right-hand side. Let's try to see if we can implement a similar example as in said wiki.
SPC | |
SPC: find file | |
, switch buffer | |
. browse files | |
: MX | |
; EX | |
< switch buffer | |
` eval | |
u universal arg | |
x pop up scratch |
# | |
# Usage : .\Invert-Image.ps1 .\test*.png | |
# | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null | |
Get-ChildItem $args[0] | ForEach-Object { | |
$image = New-Object System.Drawing.Bitmap($_.fullname) | |
for ($y = 0; $y -lt $image.Height; $y++) { | |
for ($x = 0; $x -lt $image.Width; $x++) { | |
$pixelColor = $image.GetPixel($x, $y) | |
$varR = 255 - $pixelColor.R |
# | |
# Usage : .\Merge-Image.ps1 .\test*.png .\mergeImages\ | |
# | |
$fileList = Get-ChildItem $args[0] | |
for ($i = 0; $i -lt $fileList.count; $i = $i + 2) { | |
# Add System.Drawing assembly | |
Add-Type -AssemblyName System.Drawing | |
$firstImage = [System.Drawing.Image]::FromFile((Get-Item $fileList[$i])) | |
if (($i + 1) -lt $fileList.count) { |
#=============================================================================== | |
# Replace-Content: 特定パス配下の全てのファイル内の指定文字列を置換する | |
# Param: | |
# $filePath : ファイルパス | |
# $replaceText1 : 置換対象文字列 | |
# $replaceText2 : 置換後の文字列 | |
# | |
# 使用例 | |
# #sample.txtのファイル内の"AAA"という文字列を"BBB"に置換する | |
# Get-Content "C:\Work\*" "AAA" "BBB" |