Skip to content

Instantly share code, notes, and snippets.

View virtualadrian's full-sized avatar
🤓
Geek: A knowledgeable and obsessive enthusiast.

VirtualAdrian virtualadrian

🤓
Geek: A knowledgeable and obsessive enthusiast.
View GitHub Profile
@virtualadrian
virtualadrian / Jenkinsfile
Created July 13, 2019 07:19 — forked from qzm/Jenkinsfile
Vue.js / Jenkinsfile /Pipelines
pipeline {
agent {
docker {
image 'node'
}
}
stages {
stage('Clone Sources') {
steps {
@virtualadrian
virtualadrian / README.md
Created June 9, 2019 00:05 — forked from phillipgreenii/README.md
Running NPM Scripts through maven

I am in the process of introducing single page applications to where I work. For development, using node based build tools is much easier for the single page applications. However, the build process for our organization is based upon maven. Our solution started with the maven plugin frontend-maven-plugin. It worked great at first, but then we ran into a situation that I couldn't make work with it.

As stated before, at our organization, we have the older ecosystem which is maven and the newer ecosystem which is node. Our goal was to keep the hacking to a minimum. We did this by putting all of the hacks into a single super node based build file. This is what maven calls and the reason frontend-maven-plugin wasn't sufficient. The super node based build script calls all of the other build scripts by spawning npm run. Try as I might, I could not figure out how to make the spawn work. front-end-maven-plugin downloads npm

@virtualadrian
virtualadrian / fix_slow_sb_on_macos.md
Created June 8, 2019 10:15
[Spring Boot App - Slow On MacOS]
scutil --set HostName "localhost"
@virtualadrian
virtualadrian / centos7_wifi_noNetworkManager.md
Last active April 13, 2019 02:49
[CentOS Wi-Fi Static IP without NetworkManager]

Warning: This gist is a literal brain dump, possibly containing mistakes. Read at your own perril. Check the references below if you can't get this to work.

Get rid of NetworkManager

systemctl stop NetworkManager
systemctl disable NetworkManager

yum -y remove NetworkManager
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');
@virtualadrian
virtualadrian / google-dorks
Created March 16, 2019 04:17 — forked from stevenswafford/google-dorks
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!
@virtualadrian
virtualadrian / .appendTo_apache2.conf
Created March 15, 2019 10:28 — forked from shijij/.appendTo_apache2.conf
Apache BasicAuth with MySQL (authn_dbd)
# Append to apache2.conf
# Dont forget to repalce [user] [password] [dbname] with you own info
# ref: https://httpd.apache.org/docs/2.4/mod/mod_dbd.html
# ref: https://httpd.apache.org/docs/2.4/mod/mod_authn_dbd.html
<IfModule mod_authn_dbd.c>
DBDriver mysql
DBDParams host=localhost,port=3306,user=apache,pass=apache,dbname=auth
DBDMin 2
DBDKeep 8
@virtualadrian
virtualadrian / HttpClientAutoConfiguration.java
Created March 8, 2019 17:35 — forked from jkuipers/HttpClientAutoConfiguration.java
Spring Boot auto-configuration example for an Apache Components HTTP client and its usage in all RestTemplates created by the RestTemplateBuilder, plus trace logging support
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.CookieSpecs;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.client.RestTemplateCustomizer;
@virtualadrian
virtualadrian / wsh
Created March 8, 2019 13:49 — forked from doctaphred/wsh
If you're going to curl to shell, at *least* verify the checksum!
(
script=$(curl -fsSL <INSERT URL HERE>);
checksum=$(echo "$script" | shasum -pa256 | cut -c-64);
test $checksum = <INSERT CHECKSUM HERE> || exit 1;
sh -c "$script";
)
@virtualadrian
virtualadrian / chalice_debug_config.md
Created March 8, 2019 06:35
[AWS Chalice Debug with PyCharm] Run Configuration for Chalice Debugging Local #chalice #debug
  • Script Path: /path/to/your-app/.virtualenv/bin/chalice
  • Parameters: local --port=8081 --no-autoreload
  • Python Interpreter: Interpreter in .virtualenv (same name as the project, depending on config)
  • Working Directory: /path/to/your-app