Skip to content

Instantly share code, notes, and snippets.

View alright's full-sized avatar
🇺🇦

Evgeny Tronchuk alright

🇺🇦
View GitHub Profile
@poul-kg
poul-kg / valet.conf
Last active April 30, 2024 14:09
CORS Rules for Laravel Valet Nginx
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
@dwsupplee
dwsupplee / translate-v2.json
Created November 23, 2016 17:28
Translations via POST
{
"kind": "discovery#restDescription",
"etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/6s__cFeA5l1i01rONlu3TmUQEHs\"",
"discoveryVersion": "v1",
"id": "translate:v2",
"name": "translate",
"version": "v2",
"revision": "20160627",
"title": "Translate API",
"description": "Translates text from one language to another.",

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@james2doyle
james2doyle / String.prototype.supplant.js
Created March 21, 2014 13:44
String.prototype.supplant from Douglas Crockford's Remedial JavaScript
String.prototype.supplant = function(o) {
return this.replace(/{([^{}]*)}/g,function(a, b) {
var r = o[b];
return typeof r === 'string' || typeof r === 'number' ? r : a;
});
};
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@loonies
loonies / 1_phpunit-api.md
Last active January 19, 2024 07:34
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this->anything()
"————————————————————————————————————————————————————————————————————————————————————————————————————————————————————"
" Full colors reset
"————————————————————————————————————————————————————————————————————————————————————————————————————————————————————"
" Base colors
hi ColorColumn guifg=#000000 guibg=#ffffff gui=none ctermfg=16 ctermbg=231 cterm=none
hi Conceal guifg=#000000 guibg=#ffffff gui=none ctermfg=16 ctermbg=231 cterm=none
hi Cursor guifg=#000000 guibg=#ffffff gui=none ctermfg=16 ctermbg=231 cterm=none
hi CursorIM guifg=#000000 guibg=#ffffff gui=none ctermfg=16 ctermbg=231 cterm=none
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
@paulirish
paulirish / gist:576335
Created September 12, 2010 19:05
Things to do when IE9 Beta comes out

Things to do when IE9 Beta comes out

Note significant features added since IE9 PP4

  • Implemented but not announced: box-shadow, hsla
  • Expecting: 2d transforms, css animation, css transitions, flexible box model
  • Maybe: gradients, columns, reflections, svg filters, uncrippling @font-face, 3d transforms
  • Maybe version auto-update functionality

Test Modernizr against it

  • Does it still throw an error checking elem.msTransform?
@kig
kig / gzip.js
Last active August 1, 2019 08:59
TarGZ = function(){};
// Load and parse archive, calls onload after loading all files.
TarGZ.load = function(url, onload, onstream, onerror) {
var o = new TarGZ();
o.onload = onload;
o.onerror = onerror;
o.onstream = onstream;
o.load(url);
return o;