Simple Horizontal Divider Item Decoration for RecyclerView
mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
getApplicationContext()
));
NOTE: Add item decoration prior to setting the adapter
import React from 'react'; | |
import $script from 'scriptjs'; | |
require('postscribe/htmlParser/htmlParser.js'); // This is required for postScribe, postScribe is a bit annoying. | |
const postscribe = require('exports?postscribe!postscribe'); // Needs webpack exports-loader! Otherwise, just require it and use window.postscribe. | |
// This GlobalAdCodePromise is a simple promise that uses script.js to load a javascript file and then resolve. | |
const GlobalAdCodePromise = new Promise((resolve) => { | |
setTimeout(() => { | |
$script('http://annoying.adprovider.com/ad.js', () => { |
<?php | |
<<<CONFIG | |
packages: | |
- "symfony/dom-crawler: ~2.3" | |
- "symfony/css-selector: ~2.3" | |
CONFIG; | |
use Symfony\Component\DomCrawler\Crawler; | |
$html = <<<HTML |
<!-- MIT License --> | |
<html> | |
<head> | |
<script> | |
function generateKey(alg, scope) { | |
return new Promise(function(resolve) { | |
var genkey = crypto.subtle.generateKey(alg, true, scope) | |
genkey.then(function (pair) { | |
resolve(pair) | |
}) |
# dump | |
mysqldump -u user -p database --default-character-set=utf8mb4 --result-file=dump.sql | |
# restore | |
mysql -u user -p database < dump.sql |
/** | |
* This is a project designed to get around sites using Cloudflare's "I'm under attack" mode. | |
* Using the PhantomJS headless browser, it queries a site given to it as the second parameter, | |
* waits six seconds and returns the cookies required to continue using this site. With this, | |
* it is possible to automate scrapers or spiders that would otherwise be thwarted by Cloudflare's | |
* anti-bot protection. | |
* | |
* To run this: phantomjs cloudflare-challenge.js http://www.example.org/ | |
* | |
* Copyright © 2015 by Alex Wilson <[email protected]> |
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
/* | |
* Created by Krishan Patel. | |
* Copyright (c) 2014. Rocko Labs Ltd. All Rights Reserved. | |
*/ | |
package com.rockolabs.kites.adapters; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; |
window.fluid.dockBadge = ''; | |
var notify = true; | |
setInterval(updateDockBadge, 500); | |
function updateDockBadge() { | |
var count = document.querySelector(".pls._1r.fwn:not(.hidden_elem)"); | |
if (count) { | |
if (notify) { | |
var title = document.querySelector('._kx ._l2 ._l1').textContent; | |
var text = document.querySelector('._kx ._l3').textContent; |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>diglin.mailcatcher</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>sh</string> | |
<string>-i</string> |