Headless reinstall and update https://raspberrypi.stackexchange.com/a/57023
- create a text file in /boot/ called ssh
# Python 2: | |
import socket | |
import fcntl | |
import struct | |
def getHwAddr(ifname): | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15])) | |
return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1] |
Headless reinstall and update https://raspberrypi.stackexchange.com/a/57023
angular.module('mdChipDraggable', []) | |
.directive('mdChipDraggable', function () { | |
return { | |
restrict: 'A', | |
scope: {}, | |
bindToController: true, | |
controllerAs: 'vm', | |
controller: ['$document', '$scope', '$element', '$timeout', | |
function ($document, $scope, $element, $timeout) { | |
var vm = this; |
<?php | |
/** | |
* Abstract class for making API routes | |
* | |
* @package @todo | |
* @author Josh Pollock <Josh@JoshPress.net> | |
* @license GPL-2.0+ | |
* @link | |
* @copyright 2015 Josh Pollock | |
*/ |
<?php | |
if (!function_exists(get_excerpt_by_id)) { | |
/** | |
* Returns excerpt by ID. WP_Post->post_excerpt if it presents, wp_trim_words on other case. | |
* @param mixed $post WP_Post object or post ID. Accepts WP_Post object or post ID (integer or string); | |
* @return string Excerpt | |
*/ | |
function get_excerpt_by_id($post) { | |
$return_excerpt = function($post) { | |
if ($post->post_excerpt == '') |
<?php //<~ don't add me | |
<?php if ( get_header_image() ) : ?> | |
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> | |
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt=""> | |
</a> | |
<?php endif; // End header image check. ?> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Site Title</title> | |
<link rel="stylesheet" href="/assets/css/style.min.css"> |
/** | |
* This file is enqueued by means of wp_enqueue_script() - variables are passed | |
* in from PHP by means of wp_localize_script() | |
* | |
*/ | |
/* TM: We use an anonymous function to invoke the JavaScript. Also refactored for proper | |
* WordPress coding standards. | |
*/ | |
(function( $ ) { |
var request = require("request"), | |
cheerio = require("cheerio"), | |
url = "https://www.google.com/search?q=data+mining", | |
corpus = {}, | |
totalResults = 0, | |
resultsDownloaded = 0; | |
function callback () { | |
resultsDownloaded++; |
<?php | |
//do not add in opening php tag | |
/** | |
* Add in ScrollReveal.js in a Genesis Theme | |
* | |
* @package Add in ScrollReveal.js in a Genesis Theme | |
* @author Neil Gee | |
* @link http://wpbeaches.com/using-scrollreveal-js-wordpress-genesis-theme/ |