$ brew install nginx
$ vim /usr/local/etc/nginx/nginx.conf
// @ts-check | |
import { useState, useEffect } from 'react' | |
function getCurrentLocation () { | |
return { | |
pathname: window.location.pathname, | |
search: window.location.search | |
} | |
} |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.telephony.SmsMessage; | |
import java.util.ArrayList; | |
/** | |
* @@author Chathura Wijesinghe <[email protected]> |
import android.content.Context; | |
import android.text.Layout.Alignment; | |
import android.text.StaticLayout; | |
import android.text.TextPaint; | |
import android.util.AttributeSet; | |
import android.util.TypedValue; | |
import android.widget.TextView; | |
/** | |
* Text view that auto adjusts text size to fit within the view. |
/*! | |
* youversion_abbreviations.js | |
* JSON of YouVersion.com Bible Book URL Abbreviations. | |
*/ | |
var books = { | |
'gen': 'Genesis', | |
'exo': 'Exodus', | |
'lev': 'Leviticus', | |
'num': 'Numbers', | |
'deu': 'Deuteronomy', |
{ | |
"books-of-the-bible": { | |
"entry": [ | |
{ | |
"-handle": "01", | |
"name": { | |
"-handle": "genesis", | |
"#text": "Genesis" | |
}, | |
"testament": { |
// example data | |
db={ | |
"cards": [ | |
{ | |
"_id": 1, | |
"number": "1353 5237 0976 6538", | |
"isActive": true, | |
"user": { | |
id: 2, | |
name: "Ben Kangwa" |
package test; | |
import android.arch.lifecycle.LiveData; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.IntentFilter; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
db.users.aggregate([ | |
{$group: { | |
_id: {$dateToString: {format: '%Y-%m', date: '$createdAt'}} | |
}}, | |
{$lookup: { | |
from: 'users', | |
let: {startDate: {$subtract: [{$dateFromString: {dateString: '$_id'}}, 2592000000]}}, | |
pipeline: [ | |
{$match: { | |
$expr:{ |