Skip to content

Instantly share code, notes, and snippets.

@dimaursu
dimaursu / web_dev.gpl
Last active December 29, 2023 05:07
50 web design color palettes in GPL format
GIMP Palette
Name: Web design
#
105 210 231 Giant Goldfish
167 219 219
224 228 204
243 134 48
250 105 0
255 255 255 separator
233 76 111 Cardsox
@lmullen
lmullen / convert-file-encoding-line-breaks.zsh
Created March 12, 2014 20:46
Convert text files in cp1252 with dos line endings to files in UTF-8 with Unix line endings
# Convert text files in cp1252 with dos line endings to files in UTF-8 with
# Unix line endings
for file (*.txt) {iconv -f cp1252 -t utf-8 $file -o $file}
dos2unix *.txt
@gustavohenrique
gustavohenrique / custom-jenkins-gui
Created November 14, 2013 11:11
Steps to customize the Jenkins graphical user interface
# Login
core/src/main/resources/jenkins/model/Jenkins/login.jelly
# Main page
core/src/main/resources/lib/layout/layout.jelly
core/src/main/resources/hudson/views/BuildButtonColumn/column.jelly
core/src/main/resources/lib/hudson/iconSize.jelly
core/src/main/resources/lib/hudson/rssBar.jelly
# Build
@tnolet
tnolet / puppetdb_postgres_hacks.md
Last active May 13, 2021 01:32
PuppetDB is awesome. Here's some tips on accessing the data in the Postgresql database...most of 'm just reminders for myself.

NB: The following examples where done on Puppet Enterprise 3.0 running on Centos 6. Should be similar for open source versions, except for some file locations.

1. Logging into the PuppetDB PostgresQL database on Linux

The easiest way to snoop around in de actual PuppetDB postgres database is using the command prompt. You have to be the peadmin user though. Couldn't get it working just under root.

[root@master bin]# sudo su - pe-postgres -s /bin/bash
-bash-4.1$ /opt/puppet/bin/psql
psql (9.2.4)

Type "help" for help.

@rynecheow
rynecheow / RCPanMouseAdapter.java
Last active November 30, 2018 22:15
Java snippet that does panning around a JScrollPane by add this as the MouseListener and MouseMotionListener to the viewport of the scroll pane.
//~--- JDK imports ------------------------------------------------------------
import java.awt.Cursor;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JComponent;
import javax.swing.JViewport;