-
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:
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
➜ ~ cat a.json | |
{ | |
"_meta": { | |
"tag_environment_magic": [ | |
"a" | |
] | |
} | |
} | |
➜ ~ cat b.json | |
{ |
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
#!/bin/bash | |
MPATH=$1 | |
BETCDIR='/etc/mcollective' | |
BRUBYDIR='/Library/Ruby/Site/1.8' | |
BSBINDIR='/usr/sbin' | |
BBINDIR='/usr/bin' | |
BLIBEXECDIR='/usr/libexec/mcollective' | |
BDOCDIR='/usr/share/doc/mcollective' | |
BLAUNCHDIR='/Library/LaunchDaemons' | |
BLOGDIR='/var/log/mcollective' |
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
import sys | |
import logging | |
import xml.etree.ElementTree as ET | |
import re | |
import types | |
from uuid import uuid4 | |
import cyclone.httpclient | |
import cyclone.jsonrpc |
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
import time | |
from multiprocessing import Pool | |
from pprint import pprint | |
from optopus import Client, OPTOPUS_ENDPOINT | |
from jnpr.junos import Device | |
# work in progress | |
class MetaStore(object): | |
""" |
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
if File::exists?("/sbin/ip") | |
Facter.add('gateway') do | |
setcode do | |
`/sbin/ip route show`.match(/^default.*/)[0].match(/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/)[0] | |
end | |
end | |
end |
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
option option-150 code 150 = ip-address; | |
option space JUNOS_ZTP; | |
option JUNOS_ZTP.config-file-name code 1 = text; | |
option JUNOS_ZTP.image-file-type code 2 = text; | |
option JUNOS_ZTP.transfer-mode code 3 = text; | |
option JUNOS_ZTP.alt-image-file-name code 4= text; | |
option JUNOS_ZTP-encapsulation code 43 = encapsulate JUNOS_ZTP; | |
subnet 172.16.200.0 netmask 255.255.255.0 { |
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
# show interfaces gr-0/0/0 | |
unit 0 { | |
tunnel { | |
source $FIOS_IP; | |
destination $DESTINATION; | |
routing-instance { | |
destination fios-2; | |
} | |
} | |
family inet { |
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
{ | |
"template_logstash" : { | |
"order" : 0, | |
"template" : "logstash-*", | |
"settings" : { | |
"index.query.default_field" : "@message", | |
"index.number_of_replicas" : "1", | |
"index.number_of_shards" : "3", | |
"index.routing.allocation.total_shards_per_node" : "2", | |
"index.auto_expand_replicas" : "false" |
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
private JRubyInterceptor(String scriptPath, String className) { | |
this.scriptPath = scriptPath; | |
this.className = className; | |
try { | |
logger.info("Trying to read ruby script from " + scriptPath); | |
Reader reader = new FileReader(scriptPath); | |
jruby.eval(new BufferedReader(reader)); | |
logger.info("Trying to create our interceptor class by evaluating " + className + ".new"); | |
this.rubyInterceptor = jruby.eval(className + ".new"); |
NewerOlder