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
{ | |
"id": 3, | |
"content": "My awesome post", | |
"comments": [ | |
{ "id": 3, "content": "This should be the first comment"}, | |
{ "id": 6, "content": "This should be the second comment"} | |
] | |
} |
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
Table "public.posts" | |
Column | Type | Modifiers | |
---------+---------+---------------------------------------------------- | |
id | integer | not null default nextval('posts_id_seq'::regclass) | |
content | text | | |
Indexes: | |
"posts_pkey" PRIMARY KEY, btree (id) | |
Referenced by: | |
TABLE "comments" CONSTRAINT "comments_post_id_fkey" | |
FOREIGN KEY (post_id) REFERENCES posts(id) ON DELETE CASCADE |
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
export function readFile() { | |
let path = Android.imagePath(); | |
let base64 = Android.imageData(); | |
// If there is an escaped / in the name, this will produce wrong result | |
// but still give proper type | |
let filename = path.split('/').pop(); | |
let type = getType(filename); | |
let byteString = atob(base64); |
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
@Override | |
protected void onActivityResult(int requestCode, int resultCode, Intent data) { | |
super.onActivityResult(requestCode, resultCode, data); | |
try { | |
if (requestCode == SELECT_PICTURE | |
&& resultCode == RESULT_OK | |
&& null != data) { | |
Uri selectedImage = data.getData(); | |
String[] filePathColumn = {MediaStore.Images.Media.DATA}; |
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
//For Android 3.0+ | |
public void openFileChooser(ValueCallback<Uri> uploadMsg) { | |
mUM = uploadMsg; | |
Intent i = new Intent(Intent.ACTION_GET_CONTENT); | |
i.addCategory(Intent.CATEGORY_OPENABLE); | |
i.setType("image/*"); | |
startActivityForResult(Intent.createChooser(i, "File Chooser"), FCR); | |
} | |
// For Android 3.0+, above method not supported in some android 3+ versions, |
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
$g: transparent; | |
$steps: 10; | |
@for $i from 1 to $steps { | |
$g: append($g, fade-out($bg-color, 1 / $i) percentage($i / $steps), comma); | |
$g: append($g, fade-out($bg-color, 1 / $i) percentage(($i + 0.6) / $steps), comma); | |
} | |
$g: append($g, $bg-color); | |
background: linear-gradient(to bottom, $g); |
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
RAKE_TASKS = $(shell bundle exec rake -T |cut -d ' ' -f 2| sed s/:/\\\\:/g ) | |
.PHONY: ${RAKE_TASKS} | |
${RAKE_TASKS}: | |
bundle exec rake $@ |
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
diff --git a/lib/watch.js b/lib/watch.js | |
index 4140528..9421446 100644 | |
--- a/lib/watch.js | |
+++ b/lib/watch.js | |
@@ -316,9 +316,34 @@ class BrunchWatcher { | |
this.fileList.emit('change', path, compiler, [], isHelper); | |
} else { | |
const isFor = plugin => plugin.pattern.test(path); | |
- const compiler = this.plugins.compilers.filter(isFor); | |
const currentLinters = this.plugins.linters.filter(isFor); |
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
#include "nw_private.h" | |
#include "NWApplication.h" | |
#include "NWApplicationView.h" | |
#include "nw_application.h" | |
#include "nw_keyboard.h" | |
#include "nw_geometry.h" | |
#include "nw_opengl.h" | |
#include "nw_timer.h" | |
#include "nw_autorelease_pool.h" |
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
SECRET=`cat config/prod-staging.secret.exs` | |
local _prod_secret_path="/home/builder/prod.secret.exs" | |
if [ "$TARGET_MIX_ENV" = "prod" ]; then | |
__sync_remote " | |
printf '%s\n' '$SECRET' > '$BUILD_AT/config/prod.secret.exs' | |
" | |
fi |