This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#!/bin/bash | |
##################################### | |
#Author: Leon Lee # | |
#email: [email protected] # | |
#QQ: 730395591 # | |
#Version: 1.0 # | |
#Note: If you have some good ideas # | |
# or advice, please mail me^^ # | |
##################################### |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
@With(Compress.class) | |
public class Application extends Controller { | |
public static void index() { | |
render();//response will be gzipped | |
} | |
} |
#!/bin/bash | |
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done; | |
/Applications/P4Merge.app/Contents/Resources/launchp4merge "${absargs[@]}" | |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages
and install them manually as needed.
In Tools | Options | Keyboard...
CTRL+W
as a Global shortcut for Window.CloseDocumentWindow
CTRL+W
shortcut for Edit.SelectCurrentWord
The caveat to this is if you are used to using CTRL+W
to select the current word. If you do, find another shortcut that works for that.
package util; | |
import com.google.common.io.Files; | |
import play.Logger; | |
import play.Play; | |
import play.PlayPlugin; | |
import play.libs.MimeTypes; | |
import play.mvc.Http; | |
import play.utils.Utils; | |
import play.vfs.VirtualFile; |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<!-- Replace the group ID with your group ID --> | |
<groupId>com.mycompany.hadoopproject</groupId> | |
<!-- Replace the artifact ID with the name of your project --> | |
<artifactId>my-hadoop-project</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import java.net.InetAddress; | |
import java.net.UnknownHostException; | |
import java.util.ArrayList; | |
import java.util.ConcurrentModificationException; | |
import java.util.List; | |
import java.util.Map; | |
public class GatewayUrgentDnsSwitchServiceImpl implements GatewayUrgentDnsSwitchService { |
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |