Skip to content

Instantly share code, notes, and snippets.

@appbakers
appbakers / grapeConfig.xml
Created July 31, 2018 09:27
groovy grapeConfig to use local repository
<?xml version="1.0"?>
<!-- put ~/.groovy/grapeConfig.xml and you can use local-maven-2 filesystem repo... -->
<ivysettings>
<settings defaultResolver="downloadGrapes"/>
<resolvers>
<filesystem name="local-maven-2" m2compatible="true" force="false" local="true">
<artifact pattern="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision].[ext]"/>
<ivy pattern="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision].pom"/>
</filesystem>
@appbakers
appbakers / fix-ubuntu-16.04-netextream-nic-card-firmware-error.txt
Last active May 11, 2018 11:26
fix-ubuntu-16.04-netextream-nic-card-
# error like
# bns2: Can't load firmware file "bnx2/bnx2-mips-09-6.2.1b.fw"
# find dir where it is now.
locate bnx2/bnx2-mips-09-6.2.1b.fw
# create dir where should be
mkdir /lib/firmware/bnx2
2
down vote
Using either DHCP or a static config (doesn't matter which)--AND assuming your wifi worked during install--make your /etc/network/interfaces look something like below (for wlan0 should match the name of your wifi card listed under ifconfig -a e.g. your detected wifi card could be nicknamed eth1 by the OS for all I know.):
auto lo iface lo inet loopback
auto wlan0 iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
To configure wpa_supplicant use the command (Referenced in the config above)
@appbakers
appbakers / 010-inst-apt-cyg.sh
Last active December 28, 2017 07:40
cygwin-jdk8-x86-clj-repl
mkdir ~/down
cd ~/down
wget --no-check-certificate rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
apt-cyg install curl ed unzip rsync
export JAVA_HOME=/cygdrive/c/Java/x86/jdk1.8.0_151
echo "export JAVA_HOME=/cygdrive/c/Java/x86/jdk1.8.0_151" >> ~/.profile
echo "export PATH=\$JAVA_HOME/bin:$PATH" >> ~/.profile
. ~/.profile
@appbakers
appbakers / extmap.clj
Created April 6, 2017 02:33 — forked from kriyative/extmap.clj
Extending Clojure Map with `deftype` and `defprotocol`
(ns extmap
(:import
[clojure.lang ILookup Associative]))
;; ----------------------------------------------------------------
;; TrackableMap is a persistent map which keeps track of the number of
;; times `get` was called on it.
(defprotocol Trackable
(getStats [self]))
@appbakers
appbakers / load-properties.gradle
Created February 1, 2017 01:17 — forked from groboclown/load-properties.gradle
An example gradle file for loading a hierarchy of properties from several locations in a well defined order. It also allows for the properties to be written as plain groovy scripts, and defined as closures so they can depend on other, overwritten properties.
/**
* load-properties.gradle
*
* USE: Include in your root project's `build.gradle` file:
*
* ```(groovy)
* apply from: "$rootDir/init/load-properties.gradle"
* ```
*
* Add a `$rootDir/init/categories.gradle` file to define which
@echo off
setlocal
SET DEFAULTVER=0.1.51.30.707
set SCRDIR=%~dp0
IF "%SCRDIR:~-1%"=="\" set SCRDIR=%SCRDIR:~0,-1%
echo "SCRDIR:: %SCRDIR%"
set TMPDIRNAME=
param (
[string]$major="7",
[string]$minor="79",
[string]$build="15"
)
function LogWrite {
Param ([string]$logstring);
$now = Get-Date -format s;
Add-Content $Logfile -value "$now $logstring";
@echo off
setlocal
goto instjdk7
:wgetp
set DOWNURL=%1
set DOWNFILE=%2
echo "Starting download %DOWNURL% to %DOWNFILE%"
@powershell.exe -Command "(New-Object Net.WebClient).DownloadFile('"%DOWNURL%'", '"%DOWNFILE%'")"