-
Enable
#enable-devtools-experiments
flag inchrome://flags
section. -
Open Chorme Devtools and check
Settings > Experiments > Allow extensions to load custom stylesheets
. -
Create the following four files in a dedicated folder.
3.1.
devtools.html
<html> <head></head> <body><script src="devtools.js"></script></body>
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# hello | |
# this is pure crap, don't even think about using it | |
# it doesn't filter input vars or contain ANY error handling at all | |
# i wrote this while putting a kid to bed in, january 2016 | |
# i repeat: do not use this script | |
# i am [email protected], a ceo - not a real developer | |
# prerequisites | |
# you need an account at mathem |
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.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on Swift 1.2, ObjectMapper 0.15, RealmSwift 0.94.1 | |
// Author: Timo Wälisch <[email protected]> | |
import UIKit | |
import RealmSwift | |
import ObjectMapper | |
import SwiftyJSON | |
class ArrayTransform<T:RealmSwift.Object where T:Mappable> : TransformType { | |
typealias Object = List<T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From http://www.iyware.com/osx-yosemite-mamp-homebrew-development-setup/ | |
# Install Homebrew | |
xcode-select --install | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew doctor | |
# Tap Repos | |
brew tap homebrew/dupes | |
brew tap homebrew/versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css"> | |
/****** EMAIL CLIENT BUG FIXES - BEST NOT TO CHANGE THESE ********/ | |
.ExternalClass { | |
width: 100%; | |
} | |
/* Forces Outlook.com to display emails at full width */ | |
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; } | |
/* Forces Outlook.com to display normal line spacing, here is more on that: http://www.emailonacid.com/forum/viewthread/43/ */ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import datetime | |
from mock import patch | |
from django.test import TestCase | |
from django.utils import timezone | |
class DatesTestCase(TestCase): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class React_YOLO { | |
public function __construct() { | |
add_action( 'admin_menu', array( $this, 'admin_menu' ) ); | |
} | |
public function admin_menu() { | |
add_menu_page( 'React', 'React', 'edit_posts', 'react', array( $this, 'page' ) ); | |
} |
NewerOlder