Skip to content

Instantly share code, notes, and snippets.

View ericfialkowski's full-sized avatar

Eric Fialkowski ericfialkowski

View GitHub Profile
@ericfialkowski
ericfialkowski / newest.bat
Created August 4, 2014 16:59
find newest file in a directory
@echo off
for /f "delims=" %%x in ('dir /od /a-d /b *.*') do set recent=%%x
echo %recent%
@ericfialkowski
ericfialkowski / oldest.bat
Created August 4, 2014 17:00
Find the oldest file in a directory
@echo off
for /f "delims=" %%x in ('dir /o-d /a-d /b *.*') do set oldest=%%x
echo %oldest%
@ericfialkowski
ericfialkowski / ua.bat
Created January 26, 2015 15:39
Update svn or git subdirectories
@echo off
SETLOCAL
rem
rem Update All Batch File (ua.bat)
rem Eric Fialkowski
rem
rem This script will update any svn or git sub directories of the current directory
rem It only checks one directory deep for .svn or .git directories, it is not fully recursive
rem
rem Revisions
@ericfialkowski
ericfialkowski / Server.java
Last active July 22, 2019 02:54
Java 8 simple socket server
package com.ericski.socketreceiver;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
@ericfialkowski
ericfialkowski / Vagrantfile
Last active May 31, 2016 02:09
Simple rabbitmq cluster vagrant file
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
$initscript = <<SCRIPT
echo "deb http://www.rabbitmq.com/debian/ testing main" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
wget -q -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
apt-get -q update
@ericfialkowski
ericfialkowski / Vagrantfile
Last active May 31, 2016 04:57
Simple mongodb vagrant file
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.host_name = "mongo1"
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
@ericfialkowski
ericfialkowski / Vagrantfile
Last active May 31, 2016 03:28
Installs latest jdk8 & mvn
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.host_name = "jdk8"
#config.vm.network "forwarded_port", guest: 1111, host: 1111
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.56.200"
package main
import (
"net/url"
"fmt"
"database/sql"
_ "github.com/denisenkom/go-mssqldb"
"log"
"time"
@ericfialkowski
ericfialkowski / sco.bat
Last active May 19, 2017 20:14
Batch file to checkout svn repo in "standard" format (trunk fully checkedout, branches and tags immediates only)
@echo off
if "%1"=="" GOTO USAGE
set url=%1
for %%x in (%url:/= %) do set directory=%%x
svn co --depth immediates %1
if exist %directory%/trunk (
svn update --non-interactive --set-depth infinity %directory%/trunk
@ericfialkowski
ericfialkowski / Dockerfile
Created June 22, 2017 03:33
My oracle java 8 base image
FROM ubuntu:16.04
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 seen true | /usr/bin/debconf-set-selections
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
RUN apt-get update
RUN apt-get install -y oracle-java8-installer
RUN rm -rf /var/cache/oracle-jdk8-installer && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*