Skip to content

Instantly share code, notes, and snippets.

View rossbu's full-sized avatar

ShareForEver rossbu

View GitHub Profile
## Redis CLI
select 1
config get *
config set timeout 900
info
client list
monitor
import numpy as np
def selection_sort(x):
for i in range(len(x)):
swap = i + np.argmin(x[i:])
(x[i], x[swap]) = (x[swap], x[i])
return x
@rossbu
rossbu / Multiple ssh accounts - Intellij
Last active August 27, 2021 05:52
Multiple SSh Account
Step 1: create ssh keys
Create any keypairs you'll need. I've named my default/original 'id_rsa' (which is the default) and 'id_rsa-work' for company work.
ssh-keygen -t rsa -C ross.bu@gmail.com -f id_rsa
ssh-keygen -t rsa -C ross.bu@work.com -f id_rsa_work
Step 2: ssh config
Set up multiple ssh profiles by creating/modifying ~/.ssh/config. Note the slightly differing 'Host' values
# Personal GitHub
Host github.com
@rossbu
rossbu / findClass.jsp
Created July 28, 2021 17:27
find the class in your web application -jsp
<?xml version="1.0" encoding="ISO-8859-1" ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
     <title>Servlet Container Class Finder</title>
</head>
<body>
<h2>Servlet Container Class Finder</h2>
<p>Enter the fully-qualified name of a Java class
(e.g. org.apache.oro.text.regex.Perl5Compiler) in the field below. The
@rossbu
rossbu / printApplication.jsp
Created July 28, 2021 17:26
print out system , server and application info in jsp
<%@
page contentType="text/html;charset=UTF-8" language="java"
%>
<%@ page import="java.util.*" %>
<html>
<head>
    <title></title>
</head>
<body>
Server info: <%= application.getServerInfo() %><br>
@rossbu
rossbu / .gitconfig
Last active June 28, 2021 15:07 — forked from josegonzalez/.gitconfig
Home directory .gitconfig
[user]
name = MY_NAME
email = MY_EMAIL_ADDRESS
[git-tmbundle]
gitnub-path = /Applications/GitNub.app
gitx-path = /Applications/GitX.app
show-diff-check = yes
[github]
user = GITUB_USER
token = GITHUB_TOKEN
@rossbu
rossbu / github_bitbucket_multiple_ssh_keys.md
Last active June 28, 2021 15:09 — forked from yinzara/github_bitbucket_multiple_ssh_keys.md
Managing SSH keys with multi-accts

Why Multiple SSH keys?

There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket

You may use the same computer for work and personal development and need to separate your work.

When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.

You may have different projects you're working on where you would like to segregate your access.