Skip to content

Instantly share code, notes, and snippets.

View apsamuel's full-sized avatar
🖖
Focusing

A. Samuel apsamuel

🖖
Focusing
View GitHub Profile
@apsamuel
apsamuel / noise.glsl
Last active October 2, 2022 18:30 — forked from akella/noise.glsl
noise4d
//
// Description : Array and textureless GLSL 2D/3D/4D simplex
// noise functions.
// Author : Ian McEwan, Ashima Arts.
// Maintainer : ijm
// Lastmod : 20110822 (ijm)
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
// https://github.com/ashima/webgl-noise
// Updates local variables to be prefixed with `f_` as expected by the Lamina module.
@apsamuel
apsamuel / auth.js
Created April 3, 2022 18:06
returning_sharedini_creds
export class AWSAuthenticator {
#disableAssumeRole = false
#region = awsDefaultRegion
#profile = awsDefaultProfile
#configFile = `${process.env.HOME}/.aws/config`
#sharedCredentialsFile = `${process.env.HOME}/.aws/credentials`
constructor(params = {}) {
Object.assign(this, {
...params,
@apsamuel
apsamuel / celery_issue_overview.md
Last active November 13, 2021 19:53
[SPIKE] declared queues unused by celery beat scheduled tasks

Expectations

  • Background tasks are defined in a Flask application namespace using Celery and the @app.task() decorator
  • Each tasks results is routed to a different queue on the broker

Celery is loaded

app = create_app()
celery = middleware(
I0507 16:34:56.863044 2886423488 net.cpp:219] conv5 does not need backward computation.
I0507 16:34:56.863047 2886423488 net.cpp:219] relu4 does not need backward computation.
I0507 16:34:56.863051 2886423488 net.cpp:219] conv4 does not need backward computation.
I0507 16:34:56.863054 2886423488 net.cpp:219] relu3 does not need backward computation.
I0507 16:34:56.863057 2886423488 net.cpp:219] conv3 does not need backward computation.
I0507 16:34:56.863061 2886423488 net.cpp:219] norm2 does not need backward computation.
I0507 16:34:56.863065 2886423488 net.cpp:219] pool2 does not need backward computation.
I0507 16:34:56.863068 2886423488 net.cpp:219] relu2 does not need backward computation.
I0507 16:34:56.863071 2886423488 net.cpp:219] conv2 does not need backward computation.
I0507 16:34:56.863075 2886423488 net.cpp:219] norm1 does not need backward computation.
@apsamuel
apsamuel / testingPlugin
Created December 14, 2015 12:44
TestingPlugin
print "gist";
@apsamuel
apsamuel / karmetasploiter.sh
Created October 6, 2014 14:53
A wrapper for karma/metasploit wifi attack
#!/usr/bin/env bash
#purpose: perform low level steps and execute the karma.rc resource within metasploit.
int=$1
function stop_airmon {
nic=$1
airmon-ng stop $nic
if [ $? -ne 0 ]; then echo "[+] could not stop airmon on $nic"; exit 1; else echo "[+] successfully stopped airmon for $nic"; fi
}
@apsamuel
apsamuel / solaris_port_info.ksh
Created July 11, 2013 03:01
A quick way to get solaris port information. Credits to - internet..
#!/bin/ksh
line='---------------------------------------------'
pids=$(/usr/bin/ps -ef | sed 1d | awk '{print $2}')
if [ $# -eq 0 ]; then
read ans?"Enter port you would like to know pid for: "
else
ans=$1
fi
filename = ARGV[0]
def parse_file(filename)
f = File.read(filename).split("\n").delete_if { |x|
! x.match(/.+Disk - \/.+Service.+/)
}
f.each { |x|
#!/bin/sh
# onscheduler: turn the java when it is off
# variables:
savingcell="/root/bet/schedulerLog" #log path for scheduler
applog="/root/bet/application.log"
pid=$(pgrep -f '.*java.*bet.*Main.*' >/dev/null) #find pid.
ret=$? #log result 0 - found, 1 - not found
if [ $ret -ne 0 ]
then #java is off
#!/usr/bin/python
"""Module for pulling contacts out of Google and storing them to disk
(or something).
See the official guide for a more in-depth look at GData Python
http://code.google.com/apis/contacts/docs/1.0/developers_guide_python.html
"""
import atom