Skip to content

Instantly share code, notes, and snippets.

+-----------+----------+---------+-------------+------------+-------------------+
| Framework | Lines | Longest | Average | Maximum | Percentage of |
| name | of | method | method | method | methods that are |
| | code | | complexity | complexity | non-static |
+-----------+----------+---------+-------------+------------+-------------------+
| Laravel | 54,398 | 13 | 1.62 | 17 | 94.81% |
| Symfony | 118,636 | 136 | 2.72 | 155 | 97.09% |
| Zend | 55,904 | 73 | 2.76 | 53 | 93.55% |
| Cake | 62,860 | 56 | 3.30 | 75 | 89.87% |
| Slim | 4,127 | 26 | 2.40 | 13 | 96.58% |
@coolflame87
coolflame87 / backup.php
Created March 3, 2017 12:55 — forked from Serhioromano/backup.php
AWS EC2 automatic volume daily snapshot.
#!/usr/bin/php -q
<?php
date_default_timezone_set('UCT');
$dryrun = FALSE;
$interval = '24 hours';
$keep_for = '10 Days';
$volumes = array('vol-9677d14a');
$api_key = 'AKI****EYUA';
$api_secret = 'IzMni****ct';
@coolflame87
coolflame87 / s3-sync.sh
Created March 10, 2017 08:05
Automatic S3 Sync Script
#!/bin/bash
export PATH=$PATH:/usr/local/bin/:/usr/bin
# Safety feature: exit script if error is returned, or if variables not set.
# Exit if a pipeline results in an error.
set -ue
set -o pipefail
## Automatic S3 Sync Script
# Syncs directories and S3 prefixes.
@coolflame87
coolflame87 / ec2metadata
Created March 24, 2017 12:08
ec2metadata
#! /usr/bin/python
instdata_host = "169.254.169.254"
instdata_ver = "2009-04-04"
instdata_url = "http://%s/%s" % (instdata_host, instdata_ver)
__doc__ = """
Query and display EC2 metadata.
If no options are provided, all options will be displayed
@coolflame87
coolflame87 / App.vue
Created September 28, 2017 05:27 — forked from lmiller1990/App.vue
<template>
<div id="app">
<p>
Pending: {{ $store.state.getInfoPending }}
</p>
<p>
{{ $store.state.getInfoData }}
</p>
</div>
</template>
@coolflame87
coolflame87 / chatServer.js
Created March 30, 2018 13:07 — forked from creationix/chatServer.js
A simple TCP based chat server written in node.js
// Load the TCP Library
net = require('net');
// Keep track of the chat clients
var clients = [];
// Start a TCP Server
net.createServer(function (socket) {
// Identify this client