Skip to content

Instantly share code, notes, and snippets.

View tillkruss's full-sized avatar
🏠
Working from home

Till Krüss tillkruss

🏠
Working from home
View GitHub Profile
@101arrowz
101arrowz / crc32.js
Last active November 16, 2023 10:08
Fast CRC32 in JavaScript
/**!
* Fast CRC32 in JavaScript
* 101arrowz (https://github.com/101arrowz)
* License: MIT
*/
// If you use this code, please link this gist or attribute it somehow.
// This code uses the Slice-by-16 algorithm to achieve performance
// roughly 2x greater than all other JS CRC32 implementations (e.g.
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active April 9, 2024 14:08
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@adamwathan
adamwathan / 1-add-macros.php
Last active June 11, 2022 19:55
Multiformat Endpoints in Laravel
<?php
namespace App\Providers;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Illuminate\Support\ServiceProvider;
use App\Http\Middleware\CaptureRequestExtension;
class AppServiceProvider extends ServiceProvider
@jrmadsen67
jrmadsen67 / gist:bd0f9ad0ef1ed6bb594e
Last active February 15, 2022 08:41
Laravel Quick Tip: Handling CsrfToken Expiration gracefully
Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if
a form sits there for a while (like a login form, but any the same) the csrf token in the form will
expire & throw a strange error.
Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner.
In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T!
Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function.
All of your exceptions go through here, unless you have excluded them in the $dontReport array at the

All binary can be downloaded http://pan.baidu.com/s/1hqH2Pko

Sublime Text 3, build 3083 (dev) for Windows x64

OFFSET ORIGINAL CRACKED
0xe21b3 85 3B

md5:c3522c719d24f85dd770c93b9bf9e56f

@pburtchaell
pburtchaell / styles.css
Last active February 25, 2024 12:24
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@ck-on
ck-on / hhvminfo.php
Last active September 18, 2022 05:44
HHVMinfo - phpinfo for HHVM HipHop Virtual Machine
<?php
/*
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine
Author: _ck_
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements
Version: 0.0.6
* revision history
0.0.6 2014-08-02 display fix for empty vs zero
0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements
@vertexclique
vertexclique / cracking.md
Last active April 8, 2024 18:24
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@jwillmer
jwillmer / utc_offset_list.txt
Created March 16, 2014 19:57
List of UTC offsets
Time offset Example time(ISO 8601 notation) Example locations
=========== =============================== =================
UTC−12:00 2014-03-14T20:19:12-12:00 Baker Island, Howland Island (both uninhabited)
UTC−11:00 2014-03-14T21:19:12-11:00 American Samoa, Niue
UTC−10:00 2014-03-14T22:19:12-10:00 United States (Hawaii)
UTC−09:30 2014-03-14T22:49:12-09:30 Marquesas Islands
UTC−09:00 2014-03-14T23:19:12-09:00 Gambier Islands
UTC−07:00 2014-03-15T01:19:12-07:00 Canada (northeastern British Columbia), Mexico (Sonora), United States (Arizona)
UTC−06:00 2014-03-15T02:19:12-06:00 Canada (almost all of Saskatchewan), Costa Rica, El Salvador, Ecuador (Galápagos Islands), Guatemala, Honduras, Mexico (most), Nicaragua
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin