You can post a json file with curl
like so:
curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION
so for example:
# Most part of this file is created by https://www.gitignore.io | |
### Node ### | |
# Logs | |
logs | |
*.log | |
# Runtime data | |
pids | |
*.pid |
<scheme name="Molokai" version="142" parent_scheme="Default"> | |
<option name="LINE_SPACING" value="1.0" /> | |
<option name="EDITOR_FONT_SIZE" value="14" /> | |
<option name="EDITOR_FONT_NAME" value="Menlo" /> | |
<colors> | |
<option name="ADDED_LINES_COLOR" value="a6e22e" /> | |
<option name="ANNOTATIONS_COLOR" value="66d9ef" /> | |
<option name="ANNOTATIONS_MERGED_COLOR" value="a6e22e" /> | |
<option name="CARET_COLOR" value="f8f8f2" /> | |
<option name="CARET_ROW_COLOR" value="232526" /> |
npm install package --save
will auto add to dependenciesimport com.twitter.finagle.http.path._ | |
import com.twitter.finagle.http.service.RoutingService | |
import com.twitter.finagle.http.{Request, Response, RichHttp, Http} | |
import com.twitter.finagle.{Service, SimpleFilter} | |
import org.jboss.netty.handler.codec.http._ | |
import org.jboss.netty.handler.codec.http.HttpResponseStatus._ | |
import org.jboss.netty.handler.codec.http.HttpVersion.HTTP_1_1 | |
import org.jboss.netty.buffer.ChannelBuffers.copiedBuffer | |
import org.jboss.netty.util.CharsetUtil.UTF_8 | |
import com.twitter.util.Future |
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
#!/bin/bash | |
# Chrome Refresh | |
# | |
# nik cubrilovic - nikcub.appspot.com | |
# | |
# Simple applescript browser reloader for Google Chrome. It will either open a | |
# new tab with the url passed in as an argument or refresh an existing tab. | |
# | |
# Link this up with watchr to auto-refresh browser windows when you save files |
By configuring dns and using virtual hosts - you can automatically serve folders in your ~/Sites directory under a local domain.
Wildcard DNS is a better option that editing your /etc/hosts file for every site, there are a few ways to do this.
http://mikeferrier.com/2011/04/04/setting-up-wildcard-dns-on-localhost-domains-on-osx/
<?php | |
/* html_convert_entities($string) -- convert named HTML entities to | |
* XML-compatible numeric entities. | |
*/ | |
function html_convert_entities($string) { | |
return preg_replace_callback('/&([a-zA-Z][a-zA-Z0-9]+);/S', | |
'convert_entity', $string); | |
} |
/* | |
* File: bst.js | |
* | |
* A pure JavaScript implementation of a binary search tree. | |
* | |
*/ | |
/* | |
* Class: BST | |
* |