Skip to content

Instantly share code, notes, and snippets.

View nitind's full-sized avatar

Nitin Dahyabhai nitind

View GitHub Profile
@nitind
nitind / gist:4b55b9d8b3a3211f2d2f7b651d529137
Last active July 21, 2020 20:18
Vagrantfile.bionic-podman
# -*- mode: ruby -*-
# vi: set ft=ruby :
$pvn = <<SCRIPT
DEBIAN_FRONTEND=noninteractive
. /etc/os-release
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends git build-essential java-common maven openjdk-8-jdk-headless gradle wget podman
@nitind
nitind / build-fedora.sh
Last active January 23, 2020 19:27
Build script for webtools.sourceediting on Fedora
#!/bin/bash
mkdir -p ~/wtpbuild
cd ~/wtpbuild
if [ ! -x ~/wtpbuild/Xvnc ] ; then
# Build a hardware-independent X server we can use, and watch remotely if interested
sudo dnf -y install gcc imake libzstd-devel libjpeg-devel libXmu-devel libXaw-devel Xorg zlib-devel wget maven java-1.8.0-openjdk xorg-x11-server-utils xorg-x11-proto-devel xorg-x11-server-Xorg xorg-x11-fonts-misc
wget -c -nv http://www.tightvnc.com/download/1.3.10/tightvnc-1.3.10_unixsrc.tar.gz
rm -fr vnc_unixsrc
tar xzf tightvnc-1.3.10_unixsrc.tar.gz
pushd vnc_unixsrc
@nitind
nitind / ncpi setup
Last active November 12, 2022 19:08
- Download an image from https://ownyourbits.com/downloads/ and burn onto a microSD card
- Change the pi user password from 'raspberry' to something else
- Switch locales and keyboard in raspi-config. I still had to manually set it to a 101 keyboard and "us" style, even after going through the raspi-config.
- Enable wifi if needed (RPi3B+ is the first one that supports 5GHz), wait for the unattended upgrade to complete.
- From here you can go through the "web panel" on :4443 and its setup wizard
Alternately:
- Use ncp-config to automount USB drives and move the datadir and database to USB
#!/bin/bash
export MAVEN_OPTS="-Xmx1024m"
export CLONEROOT=`pwd | sed 's/\/webtools.releng.aggregator//g'`
echo Clones are rooted in $CLONEROOT
pushd $CLONEROOT
git clone --recursive https://git.eclipse.org/r/webtools/webtools.releng.aggregator.git
git clone https://git.eclipse.org/r/webtools-common/webtools.common.git
git clone https://git.eclipse.org/r/servertools/webtools.servertools.git
popd
var config = {
channels : [ '#channel' ],
server : "irc.freenode.net",
botName : "sentinel123456",
};
var irc = require('irc');
var kickables = ['IRC ad service','bryanostergaard','Freenodegate','MattSTrout','engagement rates!','freenode and their ICO scam','"denial" on the freenode blog','unethical of Christel','freenode voting rights. Andrew Lee','those donations she speaks of'];
@nitind
nitind / Vagrantfile
Last active January 26, 2018 02:37
Vagrantfile for building WTP Source Editing under xenial64 against only the easily installable Java runtimes
# -*- mode: ruby -*-
# vi: set ft=ruby :
$pvn = <<SCRIPT
add-apt-repository ppa:webupd8team/java -y
apt-get -y update
apt-get -y upgrade
### Java installation
echo "===> Add webupd8 repository..."
@nitind
nitind / gziptee.js
Last active November 17, 2016 22:07
A transform function to use with copy-webpack-plugin that attempts to gzip assets as they're copied.
// A transform function to use with copy-webpack-plugin that
// gzips assets as they're copied.
//
var gziptee = function(src, dest) {
const gzipSmallerThan = 0.8;
function mkdirhier(dir) {
if(path.resolve('.').length < dir.length) {
mkdirhier(path.dirname(dir));
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.