Skip to content

Instantly share code, notes, and snippets.

View beatngu13's full-sized avatar
💀
Choose death!

Daniel Kraus beatngu13

💀
Choose death!
View GitHub Profile
@TheSherlockHomie
TheSherlockHomie / RenewExpiredGPGkey.md
Created January 3, 2021 16:36
Updating expired GPG keys and backing them up 🔑🔐💻

Updating expired GPG keys and their backup 🔑🔐💻

I use a GPG key to sign my git commits.

An error like this one might be a sign of an expired GPG key.

error: gpg failed to sign the data fatal: failed to write commit object
@varlog23
varlog23 / batchCodeExporter.js
Last active December 12, 2019 10:05
To run Selenium IDE's code export for all SIDE files within a folder to generate Java for JUnit files
import fs from 'fs'
var path = require('path');
const FileHound = require('filehound');
import { project as projectProcessor } from '@seleniumhq/side-utils'
import { emitTest, emitSuite } from '@seleniumhq/code-export-java-junit'
const filesPath = '.' // path to the folder containing SIDE files
const downloadPath = path.join(filesPath,'Junit') // Will by default create a JUnit folder in {filesPath}
const filesType = 'side'
function readFile(file) {
@martin-v
martin-v / slack-status.sh
Last active November 13, 2018 22:29
Set slack status based on wifi name
#!/bin/bash
#
# Add the script to your crontab, e.g.
## */20 6-22 * * 1-5 $HOME/bin/slack-status/slack.sh >> $HOME/bin/slack-status/cron.log 2>&1
set -o nounset
set -o errexit
set -o pipefail
STATUS_VAILD_FOR=1260 # 20min cron + 1min puffer
@ennerf
ennerf / pom.xml
Last active August 31, 2020 08:55
Sample pom for using fat jars (e.g. shaded or obfuscated) with the java-fx-maven plugin
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.enner.samples</groupId>
<artifactId>packager-with-shade-jar</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
@alandipert
alandipert / index.cljs.hl
Created August 29, 2016 19:11
toggle visibility
(page "index.html")
(defc people
[{:name "Alan"
:age 32
:nickname "Coolpants"}
{:name "Felix the Cat"
:age 8
:nickname "Cuddles"}
{:name "Steve"
@tomysmile
tomysmile / brew-java-and-jenv.md
Last active April 20, 2022 16:14
How To Install Java 8 on Mac

Install HomeBrew first

brew update
brew tap caskroom/cask
brew install brew-cask

If you get the error "already installed", follow the instructions to unlink it, then install again:

@tmatilai
tmatilai / Vagrantfile
Last active January 1, 2021 19:49
My global Vagrant configuration (~/.vagrant.d/Vagrantfile)
# URI of the local (caching) HTTP proxy
LOCAL_HTTP_PROXY = 'http://192.168.33.200:8123'
# Configures vagrant-cachier and vagrant-proxyconf.
# Should be called only on "local machine" providers.
def configure_caching(config)
if Vagrant.has_plugin?('vagrant-cachier')
config.cache.enable_nfs = true
config.cache.enable :gem
config.cache.enable :npm
@letmaik
letmaik / .travis.yml
Last active December 15, 2021 23:10
Deploy snapshots to Sonatype after Travis CI build
language: java
env:
global:
- SONATYPE_USERNAME=yourusername
- secure: "your encrypted SONATYPE_PASSWORD=pass"
after_success:
- python addServer.py
- mvn clean deploy --settings ~/.m2/mySettings.xml
@trongthanh
trongthanh / gist:2779392
Last active April 24, 2024 23:46
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.