Skip to content

Instantly share code, notes, and snippets.

making the world more secure

Daniel Ruf DanielRuf

making the world more secure
Block or report user

Report or block DanielRuf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
DanielRuf /
Created Dec 17, 2019 — forked from paulirish/
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
* Date picker for pickadate.js v3.6.4
(function ( factory ) {
// AMD.
if ( typeof define == 'function' && define.amd )
define( ['./picker', 'jquery'], factory )
View dependents.txt

Keybase proof

I hereby claim:

  • I am danielruf on github.
  • I am danielruf_ue ( on keybase.
  • I have a public key ASCDIKNBkMAiqfWVzYo0LS0nnv61GA-faky06u1JolPTyQo

To claim this, I am signing this object:


Keybase proof

I hereby claim:

  • I am danielruf on github.
  • I am danielruf ( on keybase.
  • I have a public key ASDWkxw8EN_Jq6h7BlmaZ_D2OiDrCwQOD7zyPGSg37GpbAo

To claim this, I am signing this object:

View gist:2ffe011a9148af03cc6c
5G Blacklist 2013
[ 5G (2013) ]
Following up on much feedback (and this post), here is an update for the 5G Blacklist for 2013. As explained in the 2012 article (and elsewhere), the 5G Blacklist helps reduce the number of malicious URL requests that hit your website. It’s one of many ways to improve the security of your site and protect against evil exploits, bad requests, and other nefarious garbage. If your site runs on Apache and you’re familiar with .htaccess, the 5G is an effective way to secure your site against malicious HTTP activity.
About the 5G Blacklist
The 5G Blacklist is a simple, flexible blacklist that checks all URI requests against a series of carefully constructed HTAccess directives. This happens quietly behind the scenes at the server level, saving resources for stuff like PHP and MySQL for all blocked requests.
How it works
View gist:8b3c478d4d270acb8dae
6G Beta
[ 6G Blacklist (beta) ]
Since releasing the 5G Blacklist earlier this year, malicious server scans and bad requests have surged with more novel attacks than I’ve seen since first getting into this stuff six years ago. In other words, now is the time to beef up security and lock things down. If you’re into monitoring your server and knowing your traffic, you may be observing the same recent spike in malicious activity. In response to these attacks, I’ve been secretly working on the next generation of G-series blacklist, the inevitable 6G Firewall.
Featured in this jam-packed post:
The 6G Firewall – beta version
Development strategy (building the 6G)
Front Line: Request strings
DanielRuf / URLScannerTest.php
Last active Oct 18, 2015
URL Scanner test files
View URLScannerTest.php
include 'phpMussel.php';
class URLScannerTest extends PHPUnit_Framework_TestCase {
public function testURLScanner_base64() {
$a = phpMussel('urlscanner_tests/base64.txt');
$this->assertEquals(2, $a);
public function testURLScanner_base64_2() {
DanielRuf / phpMussel Benchmark.jmx
Last active Aug 29, 2015
JMeter phpMussel Web Test Plan
View phpMussel Benchmark.jmx
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.8" jmeter="2.13 r1665067">
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="phpMussel Benchmark" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="Benutzer definierte Variablen" enabled="true">
<collectionProp name="Arguments.arguments"/>
You can’t perform that action at this time.