Skip to content

Instantly share code, notes, and snippets.

brook bro0k

Block or report user

Report or block bro0k

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View installing-arch-on-yoga-11e-chromebook.md

Install arch on a Lenovo Yoga 11e Chromebook

The Thinkpad Yoga 11e isn't the most popular chromebook, but you can readily pick one up for less than 200$, and it's physically built like a tank. You could throw it at a man, pick it back up, and go on typing.

This chromebook is a member of the categories "braswell" and "ULTIMA".

I'll describe the process I followed to get Arch running on it. The firmware steps should be the same if you'd like to install Gallium, an excellent chromebook-optimized distro forked from Xubuntu.

Firmware

@bro0k
bro0k / ExpirationListener.java
Created Feb 15, 2019 — forked from guozi/ExpirationListener.java
Spring Boot 2 + Spring Session 2 + Shiro 1.4 + Redis(Lettuce) Config
View ExpirationListener.java
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;
import lombok.extern.slf4j.Slf4j;
/**
* Session过期监听
* @author Frank Zeng
*
@bro0k
bro0k / ApplicationContextHolder.java
Created Nov 1, 2018 — forked from ufuk/ApplicationContextHolder.java
Utility bean for getting Spring beans from static context.
View ApplicationContextHolder.java
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
@Component
public class ApplicationContextHolder implements ApplicationContextAware {
private static ApplicationContext applicationContext;
View PrintBootCampESDInfo.swift
#!/usr/bin/env swift
//
// REPL.swift
//
// Created by nuomi on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation
@bro0k
bro0k / gist:91b8f3806587647bfbbd4b27ff96879a
Created Sep 26, 2018 — forked from rtrouton/gist:e6cf0f4064aea52fac2e5116c4b05f2e
Sierra compatible Macs, sorted by Model ID and board ID
View gist:91b8f3806587647bfbbd4b27ff96879a
MacBook9,1: 'Mac-9AE82516C7C6B903'
iMac14,1: 'Mac-031B6874CF7F642A'
iMac10,1: 'Mac-F2268DC8'
MacBookPro8,1: 'Mac-50619A408DB004DA'
MacBook6,1: 'Mac-F22C8AC8'
MacBookPro10,2: 'Mac-AFD8A9D944EA4843'
iMac12,2: 'Mac-942B59F58194171B'
iMac14,2: 'Mac-27ADBB7B4CEE8E61'
MacBook8,2: 'Mac-F305150B0C7DEEEF'
MacBookAir6,1: 'Mac-35C1E88140C3E6CF'
View rancheros-cloud-config.yml
#cloud-config
ssh_authorized_keys:
- ssh-rsa xyz
write_files:
- path: /var/lib/rancher/conf/cloud-config.yml
permissions: "0644"
owner: root
content: |
#cloud-config
ssh_authorized_keys:
@bro0k
bro0k / jenkins_delete_builds.groovy
Created Aug 17, 2018 — forked from kumbasar/jenkins_delete_builds.groovy
Jenkins - Delete old builds script
View jenkins_delete_builds.groovy
MAX_BUILDS = 10 // max builds to keep
def jobs = Jenkins.instance.items;
for (job in jobs) {
println "Job: " + job.name
try {
def recent = job.builds.limit(MAX_BUILDS)
println "Recent Builds: " + recent
println "============================="
View restore_mac_trash.pl
#!/usr/bin/env perl
# Copyright (c) 2015 Sergey Lyubka
# All rights reserved
use Encode;
my $dir = "/Users/$ENV{USER}/.Trash";
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; }
@bro0k
bro0k / dnsmasq-gfwlist.py
Created Feb 16, 2016 — forked from lanceliao/dnsmasq-gfwlist.py
将gfwlist转换成带ipset的dnsmasq规则,适用于OpenWrt智能上网
View dnsmasq-gfwlist.py
#!/usr/bin/env python
#coding=utf-8
#
# Generate a list of dnsmasq rules with ipset for gfwlist
#
# Copyright (C) 2014 http://www.shuyz.com
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules
import urllib2
import re
@bro0k
bro0k / Apache Tomcat 8 Start stop script init.d script
Created Jan 20, 2016 — forked from miglen/Apache Tomcat 8 Start stop script init.d script
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
View Apache Tomcat 8 Start stop script init.d script
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#
# Copyright (C) 2014 Miglen Evlogiev
#
# This program is free software: you can redistribute it and/or modify it under
You can’t perform that action at this time.