Skip to content

Instantly share code, notes, and snippets.

@axdotl
axdotl / keycloak-export-import-k8s.md
Last active October 30, 2023 08:43
Keycloak Export in Kubernetes

Perform Keycloak Export and Import on Kubernetes

  • Setup Keycloak in non-HA mode (replica 1)
  • Disable UserFederation
  • You might have to increase the resource limits to avoid that pod beeing killed by memory or CPU limits

See Keycloak Documentation for more details.

Export

@rgl
rgl / wait_for_http_200.sh
Last active October 30, 2024 23:44
Wait for an HTTP endpoint to return 200 OK with Bash and curl
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done'
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76
@tdd
tdd / angular-just-say-no.md
Last active November 18, 2022 20:47
Angular: Just Say No

Angular: Just say no

A collection of articles by AngularJS veterans, sometimes even core committers, that explain in detail what's wrong with Angular 1.x, how Angular 2 isn't the future, and why you should avoid the entire thing at all costs unless you want to spend the next few years in hell.

Reason for this: I'm getting tired of having to explain to everyone, chief of which all the indiscriminate Google Kool-Aid™ drinkers, why I have never believed in Angular, why I think it'll publicly fail pretty soon now (a couple years), and why it's a dead end IMO. This gist serves as a quick target I can point people to in order not to have to parrot / compile the core of the articles below everytime. Their compounded reading pretty much captures 99% of my view on the topic.

This page is accessible through http://bit.ly/angular-just-say-no and http://bit.ly/angularjustsayno, btw.

@jonbretman
jonbretman / type.js
Last active January 16, 2024 01:16
Simple type checking in JavaScript.
(function (root) {
var type = function (o) {
// handle null in old IE
if (o === null) {
return 'null';
}
// handle DOM elements
@dagwieers
dagwieers / gist:5994177
Last active March 28, 2016 19:55
Testing ansible_connection=local
[dag@moria ~]$ cat hosts
localhost ansible_connection=local
[dag@moria ~]$ ansible -i hosts localhost -m ping
localhost | success >> {
"changed": false,
"ping": "pong"
}
[dag@moria ~]$ ansible -vv -i hosts localhost -m ping
<localhost> REMOTE_MODULE ping
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 10, 2024 03:45
A badass list of frontend development resources I collected over time.
@codrineugeniu
codrineugeniu / gist:3874787
Created October 11, 2012 19:11
Pidgin Solarized Colorscheme
# Zoresvit (c) 2012 <[email protected]>
# Solarized colorscheme for pidgin. This file seats in
# ~/.purple/gtkrc-2.0
style "pidgin-solarized" {
font_name = "Sans 11"
base[NORMAL] = "#002B36"
text[NORMAL] = "#839496"
# Change the color of hyperlinks.
GtkIMHtml::hyperlink-color = "#268BD2"
@robinsloan
robinsloan / langoliers.rb
Last active November 6, 2024 14:31
The Langoliers, a tweet deletion script
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from dev.twitter.com
CONSUMER_KEY = "your_consumer_key"
@bcoe
bcoe / upload.js
Created September 1, 2012 22:57
upload.js
var xhr = _this = this,
new XMLHttpRequest(),
fd = new FormData(),
key = this.email + '/' + epoch.toString() + '/' + file.name;
// Populate the Post paramters.
fd.append('key', key);
fd.append('AWSAccessKeyId', 'XXXXXXXXXXXX');
fd.append('acl', 'private');
fd.append('success_action_redirect', "https://attachments.me/upload_callback")
@vojtajina
vojtajina / all-templates.html
Created August 15, 2012 00:00
AngularJS: load all templates in one file
<script type="text/ng-template" id="one.html">
<div>This is first template</div>
</script>
<script type="text/ng-template" id="two.html">
<div>This is second template</div>
</script>