Skip to content

Instantly share code, notes, and snippets.

Dinis Cruz DinisCruz

Block or report user

Report or block DinisCruz

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
DinisCruz /
Last active May 15, 2019
Jupyter OSBot-Commands
!pip install bokeh
from bokeh.plotting import figure
from import output_notebook, show
from numpy import cos, linspace
x = linspace(-6, 60, 1200)
DinisCruz / print-okrs.js
Created Aug 24, 2018
Jira JQuery filters
View print-okrs.js
$('.jira-issues th').css({ 'min-width' : '100px' } )
$('.jira-issues th:nth-child(1)').css({'min-width': '700px'})
DinisCruz /
Created Mar 28, 2017
Simple gulp file to serve and watch Jekyll pages
browserSync = require('browser-sync').create();
gulp = require('gulp');
shell = require('gulp-shell');
gulp.task 'build', shell.task(['jekyll build --incremental'])
gulp.task 'reload-page', ['build'], -> browserSync.reload()
gulp.task 'default' , ['build'],->
View gist:1a5fbd548c15a7a6419366c8553f4837
download docker
install docker (click cancel on the VirtualBox question)
on cmd.exe/sh
docker-machine create --driver=virtualbox default
docker-machine ssh default
docker run hello-world
docker run -it ubuntu bash
docker run -it -p 3000:3000 gogs/gogs
DinisCruz /
Created Dec 14, 2016
Script to set the pwd to use curl with an bbc cert (exported in OSX from KeyChain access)
echo "Note: run this using . ./ to set the variable in the host bash (it is expected that the bbc-cert.p12 is in the current path"
echo "What is the .p12 password: "
read -s pwd
export P12_PWD=$pwd
echo "The password has been set to the P12_PWD variable"
DinisCruz /
Created Dec 5, 2016
Jenkins install automation scripts (to work as jenkins jobs)
cd ~/_tools
tar xzvf apache-maven-3.3.9-bin.tar.gz
echo "export PATH=~/_tools/apache-maven-3.3.9/bin:$PATH" >> ~/.bashrc
DinisCruz /
Last active Oct 12, 2016
Misc veracode code snippets
function does_application_exist {
local app_name=$1
local result=$(veracode_get_app_Id "$app_name")
if [[ "$result" != "" ]]; then
echo "it exists"
echo "it doesn't exist"
DinisCruz /
Last active Oct 12, 2016
simple example to automatically run
# run this on folder to monitor and location of file
fswatch -o . | xargs -n1 -I{} ./
View xss-dance.js
(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}function E(e){va
DinisCruz /
Last active Sep 5, 2016
javap helper to quickly extract list of methods called from method
package ....appsec.utils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class JavapHelper {
You can’t perform that action at this time.