Skip to content

Instantly share code, notes, and snippets.

View 0x4a616e's full-sized avatar
🦒

Jan Gassen 0x4a616e

🦒
View GitHub Profile
@0x4a616e
0x4a616e / .vimrc
Last active August 23, 2023 02:35
MacVim Touch Bar buttons
" MacVim Touch Bar support
" ========================
" Since version 8.0 (I think), MacVim natively supports the macOS touch bar. By default it just contains
" one button to toggle fullscreen mode. To add some more useful buttons, just copy this into your .vimrc
"
" More details about the syntax can be found here: https://github.com/macvim-dev/macvim/blob/master/runtime/doc/gui_mac.txt
" For a list of touch bar image names, see https://developer.apple.com/design/human-interface-guidelines/macos/touch-bar/touch-bar-icons-and-images/
" Toggle NerdTree
@mattpwest
mattpwest / sonarqube.part3.yml
Created May 17, 2018 10:22
Sonarqube Ansible Play: Part 3 - Sonarqube
- name: Create the sonar user for running the SonarQube services
user:
name: sonar
comment: System user for running SonarQube
- name: Download SonarQube
get_url:
url: "https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-{{ sonar_version }}.zip"
dest: "/srv/sonarqube-{{ sonar_version }}.zip"
@thomasdarimont
thomasdarimont / KeycloakClientAuthExample.java
Last active January 14, 2024 10:30
Retrieve and verify AccessToken with Keycloak Client.
package de.tdlabs.keycloak.client;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.keycloak.OAuth2Constants;
import org.keycloak.RSATokenVerifier;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.keycloak.common.VerificationException;
import org.keycloak.jose.jws.JWSHeader;
import org.keycloak.representations.AccessToken;
@banjun
banjun / main.swift
Created February 14, 2017 07:36
add Touch Bar support for CLI without .app bundle nor Info.plist
class AppDelegate: NSResponder, NSTouchBarDelegate, NSApplicationDelegate {
@available(OSX 10.12.2, *)
lazy var touchbar: NSTouchBar = {
let tb = NSTouchBar()
tb.delegate = self
tb.defaultItemIdentifiers = [NSTouchBarItemIdentifier(rawValue: "test")]
return tb
}()
@joar
joar / jq-insert-var.sh
Last active May 3, 2024 13:41
Add a field to an object with JQ
# Add field
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}'
# {
# "hello": "world",
# "foo": "bar"
# }
# Override field value
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}'
{
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active May 13, 2024 08:50
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@ComFreek
ComFreek / BufferedImageTranscoder.java
Last active April 9, 2024 16:59
JavaFX & Batik SVG Renderer: Minimal example
/**
* This is a compilation of code snippets required to render SVG files in JavaFX using Batik.
* See my full post on StackOverflow: http://stackoverflow.com/a/23894292/603003
*/
package proofofconcept;
import java.awt.image.BufferedImage;
import org.apache.batik.transcoder.TranscoderException;
import org.apache.batik.transcoder.TranscoderOutput;