Skip to content

Instantly share code, notes, and snippets.

@osipxd
osipxd / .editorconfig
Last active April 23, 2024 07:06
EditorConfig for Android projects with mapping to IntelliJ IDEA's config
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120
@bigspawn
bigspawn / download-from-facecast.md
Last active April 28, 2024 12:18
How download video from facecast.net
@marekjelen
marekjelen / gist:8568448
Last active August 23, 2017 13:00
WildFly as a Systemd service
[Unit]
Description=WildFly application server
After=network.target
[Service]
Type=simple
User=wildfly
Group=wildfly
ExecStart=/opt/wildfly/bin/standalone.sh
@mariuz
mariuz / gist:4550696
Created January 16, 2013 20:35
Are you using git/svn as version control system and you ever wanted to visualize delveloper's work, how the Firebird project was developed over time ? well Gource is there to visualize all this in a beautiful way. It takes the history of your svn/git repository and visualizes the changes over time, by whom they were done and so forth. sudo apt-g…
gource firebird-git/.git -s 1 --stop-at-end --output-ppm-stream - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -crf 1 -threads 0 -bf 0 /tmp/firebird_git.mp4
@fideloper
fideloper / splunkstorm.sh
Created November 1, 2012 02:56
Ubuntu - Install Splunkstorm.com forwarder
# Splunk Storm
$ wget [ Download Splunk url ]
$ gunzip -c splunkforwarder-5.0-140868-Linux-x86_64.tgz | tar -xvpf -
$ ./splunkforwarder/bin/splunk start
$ ./splunkforwarder/bin/splunk install app stormforwarder_3de50bc823a711e2b4a81231390e9c34.spl -auth admin:changeme
$ ./splunkforwarder/bin/splunk login -auth admin:changeme
$ ./splunkforwarder/bin/splunk edit user admin -password whatever_you_want
$ ./splunkforwarder/bin/splunk add forward-server forwarder.splunkstorm.com:9997
$ ./splunkforwarder/bin/splunk add monitor /var/www/monologapp/log/fideloper.log # Starts sending data
$ ./splunkforwarder/bin/splunk add monitor /var/log/apache2/error.log
@nicerobot
nicerobot / jstatd.sh
Created November 18, 2011 00:01
Run jstatd w/o error 'access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)'
#!/bin/sh
policy=${HOME}/.jstatd.all.policy
[ -r ${policy} ] || cat >${policy} <<'POLICY'
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
POLICY
jstatd -J-Djava.security.policy=${policy} &
@msosvi
msosvi / Slf4jSessionLogger.java
Created October 30, 2011 10:25
This is a wrapper class for SLF4J. It is used when EclipseLink messages need to be logged through SLF4J.
package org.eclipse.persistence.logging;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
/**
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...