The Laracasts PHPStorm theme.
https://www.dropbox.com/s/f4l3qc2falnvq61/laracasts_theme_updated.icls
(Add to ~/Library/Preferences/WebIde80/colors
on Mac.)
package com.example.simpletablayout; | |
import android.os.Bundle; | |
import android.support.annotation.Nullable; | |
import android.support.design.widget.TabLayout; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentPagerAdapter; | |
import android.support.v4.view.ViewPager; | |
import android.support.v7.app.AppCompatActivity; |
The Laracasts PHPStorm theme.
https://www.dropbox.com/s/f4l3qc2falnvq61/laracasts_theme_updated.icls
(Add to ~/Library/Preferences/WebIde80/colors
on Mac.)
// array utils | |
// ================================================================================================= | |
const combine = (...arrays) => [].concat(...arrays); | |
const compact = arr => arr.filter(Boolean); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) |
# Ensures all line endings are committed as LF, but will checkout with native line endings | |
* text=auto | |
# -- Override Section, just in-case Git tries to be sneaky | |
# Ensure that these files are recognized as text | |
*.asp text | |
*.aspx text | |
*.asx text | |
*.c text |
env = (function() { | |
var flags = {}, ua = navigator.userAgent, el = document.createElement('div'), video = document.createElement('video'), audio = document.createElement('audio'), root = document.documentElement, i | |
function flag(names) { | |
names = names.split(' ') | |
for (i = 0; i < names.length; i++) | |
flags[names[i]] = true | |
} | |
function classnames() { | |
var names = [], name | |
for(name in flags) if (flags.hasOwnProperty(name)) |
@media only screen and (min-width: 320px) { | |
/* Small screen, non-retina */ | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
The [RFC for a new simple to use password hashing API][rfc] has just been accepted for PHP 5.5. As the RFC itself is rather technical and most of the sample codes are something you should not use, I want to give a very quick overview of the new API:
Everybody knows that you should be hashing their passwords using bcrypt, but still a surprising number of developers uses insecure md5 or sha1 hashes (just look at the recent password leaks). One of the reasons for this is that the crypt() API is ridiculously hard to use and very prone to programming mistakes.
<!-- example for the http://retinafy.me ebook --> | |
<style> | |
div.rss { | |
background: url(rss.svg); | |
width: 32px; | |
height: 32px; | |
} | |
body.no-svg div.rss { |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |