Skip to content

Instantly share code, notes, and snippets.

👣

Aaron apeckham

👣
Block or report user

Report or block apeckham

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:54d39e0f2c1892eaf0132b8df14c5635
# https://www.reddit.com/r/sysadmin/comments/cavaw6/zoom_zero_day_exploit_found/etcgorq/
(echo >/dev/tcp/localhost/19421) &>/dev/null && echo “Zoom Server Found, CVE 2019-13450 open” || echo “No Zoom Server, system is safe”
# https://www.reddit.com/r/sysadmin/comments/cavaw6/zoom_zero_day_exploit_found/etcgghl/
kill -9 $(lsof -t -i:19421) && rm -rf ~/.zoomus/ && touch ~/.zoomus
@apeckham
apeckham / 1-dag.hy
Last active Apr 27, 2019
Airflow DAG in Hy, synced from git repo with google cloud build
View 1-dag.hy
(import [airflow [DAG]]
[airflow.operators.dummy_operator [DummyOperator]]
[airflow.operators.python_operator [PythonOperator]]
[airflow.hooks.base_hook [BaseHook]]
[airflow.contrib.operators.slack_webhook_operator [SlackWebhookOperator]]
[datetime [datetime]])
(defn print-hello [] "Hello world")
(with [dag (DAG "hello_worl2" :description "Simple DAG"
@apeckham
apeckham / useragents.rb
Created Mar 28, 2018
count useragents with specific versions
View useragents.rb
hits = 0
total = 0
require 'csv'
CSV.foreach("useragents.csv") do |row|
count = row[0].to_i
total += count
if row[1] !~ /Edge/i && row[1] =~ /Chrome\/([0-9]+)/i
View passbacks.txt
====================
ORIGINAL AMP TAG
<script type='text/javascript' src='https://www.googletagservices.com/tag/js/gpt.js'>
googletag.pubads().definePassback('/1031683/Rubicon_AMP_Passback_300x250_BTF_2', [300, 250]).display();
</script>
===================
MODIFIED TAG WITH URL PATTERN MACRO
@apeckham
apeckham / ClojureFromRuby.rb
Last active Feb 11, 2018
JRuby / Clojure interop
View ClojureFromRuby.rb
#lein new app x
#cd x
#:aot :all in project.clj
#lein compile
#env CLASSPATH=$(lein classpath) jirb -rjava -w -d
java_import "clojure.java.api.Clojure"
Java::ClojureJavaApi::Clojure.var("clojure.core", "+").invoke(2,3,4)
@apeckham
apeckham / upsert.clj
Last active Jan 27, 2018
clojure jdbc copy into temporary table with upsert
View upsert.clj
(def t (java.io.File/createTempFile "filename" ".txt"))
(println (.getPath t))
(defn row [n]
[(+ n 500000) (rand-int 10000) (rand-int 10000) (rand-int 10000) (rand-int 10000) 5550555 (rand) "hello world"])
(with-open [w (io/writer t)]
(csv/write-csv w (map row (range 1000000))))
(j/with-db-transaction [tx db-spec]
@apeckham
apeckham / gist:02421f5a8ac156296f3ddfca2a72efb6
Created Jan 25, 2018
run postgres in docker with log_statement=all
View gist:02421f5a8ac156296f3ddfca2a72efb6
docker run -p 5432:5432 postgres:9.6.1 postgres -c log_statement=all
@apeckham
apeckham / .txt
Last active Jan 8, 2018
script-fu.scheme
View .txt
from https://docs.gimp.org/en/gimp-using-script-fu-tutorial-result.html
@apeckham
apeckham / bitrise.5m.cljs
Last active Sep 15, 2017
bitrise for bitbar in clojurescript with planck
View bitrise.5m.cljs
#!/usr/local/bin/planck
(require 'planck.http 'goog.json 'goog.string.format)
(def icon-success-symbol "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAbdJREFUOBGVU80rRFEUP+fOYxrlI/bWirCyMIySjI+NjbJTWBArlmp6jZWNUmTjPyB2GIuRhiyF+AOU1GSIjeK9e5xzzXvd1Kvnbu655/x+5/si/Dn5i2y7r2GOAIaBqNWYER8R4DShYDfXV7i3Kaz/Pe79ZK1+/dgAggUiUoHevhFRA8KOam5Ydtv3vsRmHAjZr7wfM3nQJkTKCMVES+OoODGRqpHjkcUrBzIcFtG9HO/QvncTlXaQBQJucl/qmT0jOinHUdCpyPdmY5DPOjINK0kgl4v+FAfCkWY7ptuiiT5PyqmbeniAhEbcZ2YqgApXhaOqajnVF87vzTwRvsFRk276sEyVj02O2hOQzc1jNk0MlZwe1zVU4yQGEKHMlS6vpU+ucucj05poPsRZguJoj+GbIPVNkM31Ht0lAbvXMoWtfCnbRah3QowtMFfJhtk6LmmdI7qrmcKzez3R5BEd8NjCum2scFFW19Nw+3cSCnGD025jwphNCuRgjGYTc6XsFmlaDIxxblS4ne8vLJkmym7zfItxiAbDWMPhh3EgOy27LV7Nh4nwJDbBBP9AYKYEG//f7/wDKPq20ttyqQEAAAAASUVORK5CYII=")
(def icon-failure-symbol "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAYpJREFUOBGVk0tKA0EQhqtjyMozeACj8Q5ZBHIBNSKo4EZ0FQh4BheuHNwoPuNj41aIkDsYNQeYK+hKTfT7OzOTVlScgmLq9f9V1d3j7Js8mZUHZuvOrEZqKknHH2adCbODshklY
You can’t perform that action at this time.