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
@With(Compress.class) | |
public class Application extends Controller { | |
public static void index() { | |
render();//response will be gzipped | |
} | |
} |
Moved to git repository: https://github.com/denji/jetbrains-cleanup-backup
Quick uninstall
JetBrains settings:
curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
Quick backup
JetBrains settings:
curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-backup.sh | bash -s
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
public class CustomerIOAdapter | |
{ | |
private static final String CUSTOMER_IO_SITE_ID = "site-id"; | |
private static final String CUSTOMER_IO_API_KEY = "api-key"; | |
public void sendEvent(String id, String eventName, Map<String, Object> map) throws IOException | |
{ | |
HttpPost request = new HttpPost("/api/v1/customers/" + id + "/events"); |
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
# Source: http://www.hpcsd.org/district.cfm?subpage=29208 | |
grade1 = "annoy attention calm comfortable consequences curious curve decide directions discover disappointed embarrassed enormous exhausted explore fair fascinating feast focus gigantic grumpy huge ignore instead investigate invite important jealous leader list lovely frustrated leader listen measuring miserable mumble negative nervous nibbled note notice observing opposite ordinary positive precious prefer problem protect proud question reminds repeat report rhyme respect rhyme searching special spotless squirm stomped suddenly suggestion surprise uncomfortable warning wonder worried" | |
grade2 = "Amaze Amusing Analyze Annoy Arranged Avoid Cause Classify Community Conclusion Connection Continue Cooperation Curious Cycle Data Describe Detail Diagram Difference Different Discover Drowsy Edit Effect Energy Enormous Escape Estimate Exercise Expect Famous Flock Friendly Frighten Frown Gasp Gather Gust Helpful Include Insist Investigate Label Leaned Living M |
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
After automatically updating Postgres to 9.6.1 via Homebrew, the pg_ctl start command didn't work. | |
The error was something like "database files are incompatible with server". | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.1 and latest 9.5.x installed, and keep 9.6.1 as default | |
brew unlink postgresql | |
brew install postgresql95 | |
brew unlink postgresql95 | |
brew link postgresql |
- macOS 10.15.5
- tmux 3.1b
macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.
Instead of tmux-256color
, use screen-256color
which comes with system. Place this command into ~/.tmux.conf
or ~/.config/tmux/tmux.conf
(for version 3.1 and later):