git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
Edit: This list is now maintained in the rust-anthology repo.
<?php | |
function levenshtein_php($str1, $str2){ | |
$length1 = mb_strlen( $str1, 'UTF-8'); | |
$length2 = mb_strlen( $str2, 'UTF-8'); | |
if( $length1 < $length2) return levenshtein_php($str2, $str1); | |
if( $length1 == 0 ) return $length2; | |
if( $str1 === $str2) return 0; | |
$prevRow = range( 0, $length2); | |
$currentRow = array(); | |
for ( $i = 0; $i < $length1; $i++ ) { |
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <barryvdh@gmail.com> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
<?php | |
/* | |
* Place this with the rest of your rules. | |
* Doesn't need to be in an array as there are no pipes. | |
* Password is required with a minimum of 6 characters | |
* Should have at least 1 lowercase AND 1 uppercase AND 1 number | |
*/ | |
$rules = [ | |
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/' | |
]; |
!! | |
!! Implementation of JSONPatch (http://jsonpatch.com/) using PostgreSQL >= 9.5 | |
!! | |
CREATE OR REPLACE FUNCTION jsonb_copy(JSONB, TEXT[], TEXT[]) RETURNS JSONB AS $$ | |
DECLARE | |
retval ALIAS FOR $1; | |
src_path ALIAS FOR $2; | |
dst_path ALIAS FOR $3; | |
tmp_value JSONB; |
/*<?php | |
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
//\u000A\u002F\u002A | |
class PhpJava { | |
static function main() { | |
echo(//\u000A\u002A\u002F | |
"Hello World!"); | |
}} | |
//\u000A\u002F\u002A | |
PhpJava::main(); |
#!/bin/bash | |
# | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Mathias Leppich <mleppich@muhqu.de> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |