This file contains hidden or 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
| <?php | |
| class BlogController extends Controller | |
| { | |
| /** | |
| * Posts | |
| * | |
| * @return void | |
| */ | |
| public function showPosts() |
This file contains hidden or 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
| [supervisord] | |
| nodaemon=true | |
| loglevel=debug | |
| [program:amon] | |
| command=gunicorn -c gunicorn.conf.py wsgi | |
| directory=/amon | |
| autostart=true | |
| autorestart=true | |
| redirect_stderr=true |
This file contains hidden or 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
| <?php | |
| /************************************************* | |
| * API base controller for laravel | |
| *************************************************/ | |
| class ApiController extends Controller { | |
| /** | |
| * Create a json Response including errors and no data | |
| * @param array $errors the errors | |
| * @return responce The responce including error data |
This file contains hidden or 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
| /* | |
| In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
| server, but for some reason omit a client connecting to it. I added an | |
| example at the bottom. | |
| Save the following server in example.js: | |
| */ | |
| var net = require('net'); |
This file contains hidden or 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
| package com.greenchiu.nets; | |
| import java.io.UnsupportedEncodingException; | |
| import java.util.Map; | |
| import org.json.JSONException; | |
| import org.json.JSONObject; | |
| import com.android.volley.NetworkResponse; | |
| import com.android.volley.ParseError; |
This file contains hidden or 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
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| # !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading | |
| # slashes. | |
| # If your page resides at | |
| # http://www.example.com/mypage/test1 | |
| # then use | |
| # RewriteBase /mypage/test1/ | |
| RewriteBase / | |
| RewriteCond %{REQUEST_FILENAME} !-f |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # encoding=utf-8 | |
| ''' | |
| formhub data importer | |
| Automates the submission of formhub XForms from a CSV file, | |
| possibly an export from another formhub form. | |
| Launch with `bulk` argument to trigger bulk submission behavior (only |
NewerOlder