Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#!/usr/bin/env python | |
""" | |
RSS.py | |
Classes for working with RSS channels as arbitrary data structures. | |
Requires Python 2.2 or newer and PyXML 0.7.1 or newer. | |
ChannelBase - Base class for RSS Channels. | |
CollectionChannel - RSS Channel modeled as a URI-per-entry |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
public class ExampleController { | |
@RequestMapping(value = {"/blah", ""}) | |
public @ResponseBody Map<String, Object> blah(@Valid Blah blah, BindingResult errors, ModelMap model) { | |
if (errors.hasErrors()) { | |
return ModelUtils.mapBuilder().put("status", "errors").build(); | |
} | |
return ModelUtils.mapBuilder().put("status", blah.getFirst() + " " + blah.getLast()).build(); | |
} | |
public static class Blah { |
;; Copyright Jason Wolfe and Prismatic, 2013. | |
;; Licensed under the EPL, same license as Clojure | |
(use 'plumbing.core) | |
(require '[clojure.java.shell :as shell] | |
'[clojure.string :as str]) | |
(import '[java.util HashSet] '[java.io File]) | |
(defn double-quote [s] (str "\"" s "\"")) |
(require '[plumbing.core :refer [fnk]]) | |
(require '[plumbing.graph :as graph]) | |
(defn calculate-deps [f] | |
(map (fn [parent] [parent (first f)]) (-> f second meta first second first keys))) | |
(defn print-dot [graph] | |
(println (clojure.string/join "\n" | |
(map (fn [r] (str "\""(first r) "\" -> \"" (second r) "\";")) |
;; I wrote this in the Eurostar on my way back from the last lambdanext.eu clojure course. | |
(ns comprehensions | |
(:refer-clojure :exclude [for doseq]) | |
(:require [clojure.core.reducers :as r])) | |
;; borrowed from clojure.core | |
(defmacro ^{:private true} assert-args | |
[& pairs] | |
`(do (when-not ~(first pairs) |
grab the moto-fastboot version of fastboot here
grab the appropriate stock firmware here (tip: you want the one that matches your android build number in settings -> about phone)
unzip this file somewhere and make it easy to run the moto-fastboot-osx64
command from step 1
get your phone into fastboot mode, google it if needed but just power the phone off, hold the down volume key and power button for 3 seconds then let go, should get you there
verify you are ready for flashing:
./moto-fastboot-osx64 devices
-- should list a device --
most of the time you just need to flash system and recovery images, so from your unzipped stock firmware files do this:
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
unless ARGV.size > 0 | |
puts " Missing executable file argument" | |
puts " Usage (in a Dockerfile)" | |
puts " RUN crystal run ./path/to/list-deps.cr -- ./bin/executable" | |
exit 1 | |
end | |
executable = File.expand_path(ARGV[0]) | |
unless File.exists?(executable) |