This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options("/*", | |
(request, response) -> { | |
String accessControlRequestHeaders = request | |
.headers("Access-Control-Request-Headers"); | |
if (accessControlRequestHeaders != null) { | |
response.header("Access-Control-Allow-Headers", | |
accessControlRequestHeaders); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# this can be useful when developing against a custom DNS server, or | |
# for example, if you made a change to the DNS settings of a domain, and you | |
# know the authoritative nameserver IP address for a domain, you could use this | |
# to bypass the intermediate DNS cache, and apply an HTTP request using the new | |
# DNS settings supplied by your specified (authoritative) nameserver | |
curl --dns-servers <DNSIP,DNSIP> url.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========================================================== | |
// CUSTOM JAVASCRIPT CONSOLE | |
// built by jakub fiala | |
// | |
// this small script intercepts the standard console methods | |
// and provides a way of accessing their messages, | |
// as well as stack traces, which is really cool. | |
// it formats the stack traces for popular browsers | |
// | |
// contributions welcome! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requirements | |
sudo apt-get install -qyy dconf-tools | |
# careful, if you already have custom hotkeys this commands will overwrite the first 7 ... | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name "'SouthWest(7)0,1080'" | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding "'<Primary><Super>a'" | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command "'wmctrl -r :ACTIVE: -e 7,0,1080,-1,-1'" | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/name "'SouthEast(9)1920,1080'" | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/binding "'<Primary><Super>d'" | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/command "'wmctrl -r :ACTIVE: -e 9,1920,1080,-1,-1'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ "key": "cmd+shift+r", "command": "workbench.action.quickOpen" }, | |
{ "key": "cmd+shift+f", "command": "editor.action.format", "when": "editorTextFocus" }, | |
{ "key": "alt+cmd+down", "command": "editor.action.copyLinesDownAction", "when": "editorTextFocus" }, | |
{ "key": "alt+cmd+up", "command": "editor.action.copyLinesUpAction", "when": "editorTextFocus" }, | |
{ "key": "alt+down", "command": "editor.action.moveLinesDownAction", "when": "editorTextFocus" }, | |
{ "key": "alt+up", "command": "editor.action.moveLinesUpAction", "when": "editorTextFocus" }, | |
{ "key": "cmd+d", "command": "editor.action.deleteLines", "when": "editorTextFocus" }, | |
{ "key": "alt+cmd+r", "command": "editor.action.rename", "when": "editorTextFocus" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). | |
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and | |
# run `sudo service procps start` or reboot. | |
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit | |
# | |
# More information resources: | |
# -$ man inotify # manpage | |
# -$ man sysctl.conf # manpage | |
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export Register=https://register.example.com | |
export cLink="/v2/_catalog?n=10" | |
export cFile=docker.register.catalog | |
export tFile=docker.register.tags | |
export wgetC="wget -O- -q -S " | |
# Usage with user/password | |
# export wgetC="wget -O- -q -S --user=ondra --password=heslo " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Go Lang find files with extension from the current working directory. | |
Copyright (c) 2010-2014 Alex Niderberg */ | |
package main | |
import ( | |
"fmt" | |
"os" | |
"path/filepath" | |
"regexp" |