A PHP extension that allows you to:
- walk through your code by Remote Debugging
- find bottlenecks in your application by Profiling
- find Code Coverage in a single request
- trace your application by logging all function calls
#!/bin/sh | |
# If commit message does not refer to any CH story number, | |
# this hook will parse the CH story from the current branch and | |
# append it to the commit message | |
# | |
# Example: | |
# Branch: hassansin/ch1643/custom-subdomains | |
# commit message: add support for EU base urls | |
# appended commit message: Add support for EU base urls [ch1643] |
package main | |
import ( | |
"errors" | |
"fmt" | |
"math/rand" | |
"net/http" | |
"sync" | |
"time" |
'use latest'; | |
import nodemailer from '[email protected]'; | |
import request from '[email protected]'; | |
module.exports = function(context, cb) { | |
const url = context.query.url; | |
const kindleAddress = context.query.address || context.secrets.KINDLE_ADDRESS; | |
if (!url) { | |
return cb(null, "missing url parameter"); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.3/benchmark.min.js"></script> | |
</head> | |
<body> |
#!/usr/bin/env node | |
/** | |
* Send a Joke to your mobile using AWS SNS service | |
* Usage: | |
* ./send.js phoneNumber [firstName] [lastName] | |
* | |
*/ | |
const http = require('http'); |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
Working With MongoDB TTL Index
db.collection.createIndex( { orderDate: 1, zipcode: -1 }, {background: true} ) | |
db.events.ensureIndex( { "timestampISO": 1 }, { expireAfterSeconds: 120*24*60*60 } ) // <3.0, TTL index, 120day retention period | |
db.collection.getIndexes() //get all indexes | |
db.collection.dropIndex("name"); //drop single index | |
db.collection.dropIndexes(); //drop all indexes | |
db.collection.find({ email: '[email protected]' }).explain("executionStats") // <3.0 : https://docs.mongodb.org/manual/reference/method/cursor.explain/#cursor.explain | |
//https://docs.mongodb.org/manual/tutorial/measure-index-use/ | |
db.collection.explain("executionStats").find({ email: '[email protected]' }) // 3.0 + | |
db.events.totalIndexSize() // in bytes, should not exceed RAM |
license: gpl-3.0 | |
height: 300 | |
border: no |