Skip to content

Instantly share code, notes, and snippets.

View SmiddyPence's full-sized avatar

Nicholas Smith SmiddyPence

View GitHub Profile
@SmiddyPence
SmiddyPence / gist:456a85ef62fbe502f67f3b2f30f679a1
Created February 19, 2019 10:26
Git Update Multiple Repos
git config --global alias.up '!git remote update -p; git merge --ff-only @{u}'
#!/bin/sh
for repo in repo1 repo2 repo3 repo4; do
(cd "${repo}" && git checkout master && git up)
done
@SmiddyPence
SmiddyPence / HttpProxyConfig.java
Created February 6, 2015 09:52
Static Java Block To Set Proxy for external http requests
static {
final String authUser = "XXXXX";
final String authPassword = "XXXXXX";
Authenticator.setDefault(
new Authenticator() {
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(
authUser, authPassword.toCharArray());
}
}
@SmiddyPence
SmiddyPence / javaparser-82-test.patch
Created January 15, 2015 10:04
#82 JavaParser Example Test
Index: javaparser-testing/src/test/resources/com/github/javaparser/bdd/parsing_scenarios.story
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- javaparser-testing/src/test/resources/com/github/javaparser/bdd/parsing_scenarios.story (revision 15a23ae2350c29a11da98fdd9d5d3765e3f2ee27)
+++ javaparser-testing/src/test/resources/com/github/javaparser/bdd/parsing_scenarios.story (revision )
@@ -162,7 +162,7 @@
Then lambda in statement 1 in method 1 in class 1 body is "System.out.println("Hello world!");"
Then lambda in statement 2 in method 1 in class 1 block statement is null
@SmiddyPence
SmiddyPence / runPythonSimpleServer.cmd
Last active November 25, 2015 08:18
Python Simple HTTP Server
python -m http.server [port]
# python -m SimpleHTTPServer 8000
@SmiddyPence
SmiddyPence / R Studio Behind a Proxy - Steps
Last active February 6, 2023 11:16
R Studio Behind a Proxy
1) Create the .Renviron file in user home. Likely /Documents on Windows (You should find a .Rhistory file there)
This file isn't created until you have close RStudio for the first time.
options(internet.info = 0)
http_proxy=http://my-proxy-server/
http_proxy_user=username:password
2) Check in RStudio Sys.getenv("http_proxy")
@SmiddyPence
SmiddyPence / gitUpdateFork.cmd
Created July 29, 2014 08:47
Git Updating Fork
# Add original/upstream repo as remote
git remote add upstream https://github.com/whoever/whatever.git
# Fetch new commits
git fetch upstream
# Make sure your on your own master
git checkout master
# Replay any of your commits ontop of upstream commits
@SmiddyPence
SmiddyPence / no-snapshot-updates
Last active August 29, 2015 14:04
Stop Jetty:Run downloading the internet
jetty:run --no-snapshot-updates
@SmiddyPence
SmiddyPence / install.sh
Created April 28, 2014 17:44
Install Neo4J On Ubuntu
wget -O - http://debian.neo4j.org/neotechnology.gpg.key >> key.pgp
sudo apt-key add key.pgp
echo 'deb http://debian.neo4j.org/repo stable/' | sudo tee -a /etc/apt/sources.list.d/neo4j.list > /dev/null
sudo apt-get update && sudo apt-get install neo4j
sudo service neo4j-service (stop|start|restart)
@SmiddyPence
SmiddyPence / ubuntuUpdateJDK
Created March 10, 2014 19:55
Ubuntu change JDK/JRE version
sudo update-alternatives --config javac
sudo update-alternatives --config java
@SmiddyPence
SmiddyPence / selectAllObjects.sql
Created March 10, 2014 15:37
Oracle Drop All Objects
select 'drop '||object_type||' '|| object_name|| DECODE(OBJECT_TYPE,'TABLE',' CASCADE CONSTRAINTS;',';') from user_objects