This gist lists only the basic commands to test REST APIs with curl. If you need something more advanced, this book has everything you may need.
Display the response only
This gist lists only the basic commands to test REST APIs with curl. If you need something more advanced, this book has everything you may need.
Display the response only
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
) | |
func main() { |
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"regexp" | |
"strings" | |
) |
<?php | |
/** | |
* Provide key-value list of various entities | |
* | |
* Created by: Anis Ahmad <anis.programmer@gmail.com> | |
* Created at: 8/26/18 4:42 PM | |
*/ | |
namespace AppBundle\Traits; | |
trait ListProvider |
SELECT | |
@a:=@a+1 AS sl, | |
t.field_name, | |
ot.other_field_name, | |
-- more fields... | |
FROM | |
(SELECT @a:= 0) AS a, | |
primary_table_name t | |
JOIN other_table ot ON t.other_id = ot.id | |
WHERE |
upstream go-http-backend { | |
server 127.0.0.1:3000; | |
keepalive 20; | |
} | |
server { | |
listen 80; | |
server_name sub.domain.com; | |
# adjust as per app's requirement |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name my-app.tld www.my-app.tld; | |
# Serve assets directly from nginx | |
location ~ ^/(scripts/|images/|img/|js/|css/|stylesheets/|media/|robots.txt|humans.txt|favicon.ico) { | |
root /path/to/my-app/public/; | |
access_log off; |
#!/bin/bash | |
# ---------------------------------------------------- | |
# A Shell script to take MySql database backup | |
# and upload to MEGA cloud storage using megatools | |
# ---------------------------------------------------- | |
# REQUIREMENTS : You should have - | |
# 1. Registered and verified MEGA account - https://mega.nz/ | |
# 2. Installed megatools - https://github.com/megous/megatools | |
# ---------------------------------------------------- |
cd ~ | |
yum install -y xorg-x11-fonts-75dpi xorg-x11-fonts-Type1 openssl git-core fontconfig | |
wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
mv wkhtmltox/bin/wkhtmlto* /usr/bin | |
# Thanks to | |
# https://jaimegris.wordpress.com/2015/03/04/how-to-install-wkhtmltopdf-in-centos-7-0/ | |
# https://gist.github.com/Rajeshr34/2e9b2438ff142e51c729b4b9b772680a |
import {Query} from './query' | |
let MongoClient = require('mongodb').MongoClient; | |
let defaultFailure = function (err) { throw err; }; | |
class Mongo { | |
connected: boolean; | |
db: any; |