Skip to content

Instantly share code, notes, and snippets.

@olegch
olegch / README.md
Created January 24, 2012 16:46
These scripts are used for simple management of hostnames for several VirtualBox VMs comprising a test or sandbox environment on your local machine.

These scripts are used for simple management of hostnames for several VirtualBox VMs comprising a test or sandbox environment on your local machine.

Architecture:

  1. each VM is configured to use bridged network adapter, so all VMs and the host can see each other

  2. a script is installed in each VM to run on post-ifup, which grabs VM's IP, puts "$IP $desired-hostname $desired-fully-qualified-hostname" into /etc/hosts, changes hostname correspondingly, and puts VM's hostname and fq-hostname into VM's properties

  3. a script is used on the host machine, which loops through running VMs, and updates /etc/hosts on the host machine and on the VMs

@phred
phred / pedantically_commented_playbook.yml
Last active November 3, 2023 01:55
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####
@jewelsea
jewelsea / JQueryWebView.java
Created July 9, 2012 18:05
Embeds jQuery in a document loaded into a WebView.
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import org.w3c.dom.Document;
/**
@halyph
halyph / postbuild.groovy
Last active April 5, 2019 13:58
Jenkins Groovy Postbuild script
import hudson.model.*
import com.tikal.jenkins.plugins.multijob.*;
void log(msg) {
manager.listener.logger.println(msg)
}
threshold = Result.SUCCESS
void aggregate_results() {
@kouphax
kouphax / Darcula.itermcolors
Created January 24, 2013 22:27
Jetbrains IntelliJ IDEA Darcula Theme ported to iTerm2 colour scheme. WIP.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.16300885379314423</real>
<key>Green Component</key>
<real>0.16304571926593781</real>
@nddrylliog
nddrylliog / android_configure.sh
Created February 1, 2013 00:51
Cross-compile autotools library for Android / arm-linux-androideabi I stick that in ~/bin/, chmod +x, and then run it in place of "./configure" in my project. Then a make and make install later, the prefix contains libraries built for android. Neato eh?
#!/bin/sh
# I put all my dev stuff in here
export DEV_PREFIX=$HOME/Dev/
# Don't forget to adjust this to your NDK path
export ANDROID_NDK=${DEV_PREFIX}/android-ndk-r8d/
export CROSS_COMPILE=arm-linux-androideabi
@jfryman
jfryman / personal_boxen_manifest.pp
Last active November 30, 2019 05:05
Personal Boxen Manifest
class people::jfryman {
# Applications
include chrome::stable
include onepassword
include dropbox
include alfred
include macvim
include zsh
include homebrew
include fitbit
@jewelsea
jewelsea / WebViewCaptureDemo.java
Created May 23, 2013 05:38
Captures web pages to image files using JavaFX WebView and ImageIO
import javafx.animation.PauseTransition;
import javafx.application.Application;
import javafx.beans.value.*;
import javafx.embed.swing.SwingFXUtils;
import javafx.event.*;
import javafx.geometry.Bounds;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.image.*;
import javafx.scene.layout.*;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@ptrv
ptrv / spatialite_example.go
Last active September 8, 2022 02:48
SpatiaLite example in Go
package main
import (
"database/sql"
"github.com/mattn/go-sqlite3"
"log"
"os"
)
func runQuery(db *sql.DB, query string) {