Skip to content

Instantly share code, notes, and snippets.

View idefav's full-sized avatar
💭
I may be slow to respond.

idefav idefav

💭
I may be slow to respond.
  • pingan
  • shanghai
View GitHub Profile
public class SecurityInitializer extends AbstractSecurityWebApplicationInitializer {
public SecurityInitializer() {
super(SecurityConfig.class, RedisConfig.class);
}
}
@idefav
idefav / rancher-cleanup.sh
Last active August 20, 2021 23:13
cleanup rancher install
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke /etc/cni/net.d/*"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
systemctl daemon-reload
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@idefav
idefav / README.md
Created April 16, 2022 06:44 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@idefav
idefav / gitconfig.md
Created July 14, 2023 02:13 — forked from ffittschen/gitconfig.md
Use IntelliJ or WebStorm as git mergetool with SourceTree

Use IntelliJ or WebStorm as git mergetool

Configure Sourcetree

The merge tool that ships with JetBrain's IntelliJ IDEA or WebStorm is really awesome and way better than FileMerge. It is quite simple to configure SourceTree to use it as the default mergetool:

  1. Open the SourceTree preferences and select the Diff tab
  2. Choose Custom both as Visual Diff Tool and as Merge Tool
  3. Paste the following commands into the textfields:
  • Diff Command: /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea diff
@idefav
idefav / openssl_2way_auth.sh
Created August 24, 2023 02:42 — forked from zapstar/openssl_2way_auth.sh
Steps to create CA, server and client keys + certificates for SSL 2-way authentication
# Move to root directory...
cd /
mkdir keys
cd keys
# Generate a self signed certificate for the CA along with a key.
mkdir -p ca/private
chmod 700 ca/private
# NOTE: I'm using -nodes, this means that once anybody gets
# their hands on this particular key, they can become this CA.
@idefav
idefav / GitConfigHttpProxy.md
Created June 13, 2024 15:17 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like: