Skip to content

Instantly share code, notes, and snippets.

View cyberplant's full-sized avatar

Luar Roji cyberplant

View GitHub Profile
@cyberplant
cyberplant / Jenkinsfile
Created September 8, 2020 18:11 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage c…
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8-alpine
@cyberplant
cyberplant / .gitignore
Created January 5, 2018 21:57 — forked from ErikAugust/spectre.c
Spectre example code
spectre
@cyberplant
cyberplant / test_smtp_auth.py
Last active May 31, 2016 21:15
Simple code to test SMTP auth on servers.
import base64
import socket
import argparse
import time
def read(s):
print s.recv(512),
import hmac
import hashlib
import base64
AWS_SECRET_KEY = raw_input("AWS Secret Key >")
MESSAGE = "SendRawEmail"
VERSION = chr(0x02)
@cyberplant
cyberplant / clean_fb_virus.py
Created April 16, 2014 08:20
This simple and quick scripts allows you to remove comments with a special text on it. In this case, I used it to remove all comments in photos with the text "the_real_sims" on them, they were created by a virus of a couple of friends.
# coding: utf-8
# To use this, you have to get a token from here: https://developers.facebook.com/tools/explorer/
# With publish_actions privileges (needed to be able to delete comments).
ACCESS_TOKEN = ""
# Main structure taken from:
# http://nbviewer.ipython.org/github/ptwobrussell/Mining-the-Social-Web-2nd-Edition/blob/master/ipynb/Chapter%202%20-%20Mining%20Facebook.ipynb
@cyberplant
cyberplant / jboss
Created December 20, 2013 18:53
JBoss init.d script. Extracted from: http://stackoverflow.com/questions/6880902/start-jboss-7-as-a-service-on-linux and modified to suit my needs. It has to be placed in /etc/init.d Change the line "USER=desarrollo" to the user that will be running your JBoss. To see the contents of java.sh and jboss.sh scripts see the StackOverflow link.
#!/bin/sh
### BEGIN INIT INFO
# Provides: jboss
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop JBoss AS v7.1.1
### END INIT INFO
#
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Requirements:
$ sudo pip install boto dnspython
Edit this file to change your AWS credentials and domain info.
traceroute to dreamhost
traceroute to apache2-heavy.hypnos.dreamhost.com (208.113.190.6), 30 hops max, 60 byte packets
1 cen1bras2.antel.net.uy (200.40.17.9) 51.826 ms 52.932 ms 54.664 ms
2 ibb2cen1-1-4-93.antel.net.uy (200.40.17.81) 56.613 ms 58.252 ms 58.959 ms
3 ibb2agu1-1-2.antel.net.uy (200.40.16.69) 204.615 ms 206.228 ms 206.688 ms
4 ibr2nap3-0-2-1-0.antel.net.uy (200.40.16.174) 227.112 ms 227.141 ms 231.009 ms
5 xe-10-3-0.mia10.ip4.tinet.net (216.221.158.61) 264.222 ms 265.873 ms 176.52.252.93 (176.52.252.93) 235.832 ms
6 Xe2-1-3-0-grtmiabr4.red.telefonica-wholesale.net (213.140.36.90) 235.837 ms Te0-0-0-9-grtmiabr5.red.telefonica-wholesale.net (94.142.121.146) 173.018 ms Te0-6-0-8-grtmiabr5.red.telefonica-wholesale.net (94.142.125.153) 173.952 ms
7 internap-gw.ip4.tinet.net (77.67.79.58) 249.906 ms 246.214 ms 249.256 ms
8 border3.po1-20g-bbnet1.lax010.pnap.net (216.52.255.10) 239.091 ms * 213.140.52.46 (213.140.52.46) 226.612 ms
traceroute to dreamhost
traceroute to apache2-heavy.hypnos.dreamhost.com (208.113.190.6), 30 hops max, 60 byte packets
1 192.168.10.1 (192.168.10.1) 0.509 ms 0.939 ms 1.253 ms
2 puragu1bras1.antel.net.uy (200.40.18.25) 11.242 ms 11.513 ms 11.494 ms
3 ibb2agu1-7-4-93.antel.net.uy (200.40.18.229) 11.476 ms 11.475 ms 11.735 ms
4 ibr2nap3-0-2-1-0.antel.net.uy (200.40.16.174) 154.474 ms 154.520 ms 154.562 ms
5 xe-10-3-0.mia10.ip4.tinet.net (216.221.158.61) 182.125 ms 176.52.252.93 (176.52.252.93) 166.931 ms 167.816 ms
6 xe-9-1-0.lax20.ip4.tinet.net (89.149.181.166) 222.657 ms Xe10-0-0-0-grtmiabr4.red.telefonica-wholesale.net (94.142.119.230) 173.725 ms xe-8-2-0.lax20.ip4.tinet.net (89.149.182.174) 283.215 ms
7 internap-gw.ip4.tinet.net (77.67.79.58) 268.782 ms Xe3-1-6-0-grtnycpt2.red.telefonica-wholesale.net (94.142.126.117) 220.230 ms Xe7-1-0-0-grtwaseq4.red.telefonica-wholesale.net (94.142.122.157) 165.272 ms
8 213.140.52.46 (213.140.52.46) 188.574 ms * 198.324 ms
traceroute to ftp.es.debian.org (82.194.78.250), 30 hops max, 60 byte packets
1 192.168.10.1 (192.168.10.1) 2.973 ms 3.624 ms 3.882 ms
2 puragu1bras1.antel.net.uy (200.40.18.25) 12.969 ms 13.015 ms 13.061 ms
3 ibb2agu1-7-4-93.antel.net.uy (200.40.18.229) 13.150 ms 13.206 ms 13.249 ms
4 ibr2nap3-0-2-1-0.antel.net.uy (200.40.16.174) 148.836 ms 148.883 ms 149.033 ms
5 xe-10-3-0.mia10.ip4.tinet.net (216.221.158.61) 182.213 ms 182.257 ms 176.52.252.93 (176.52.252.93) 149.664 ms
6 XE6-0-1-0-grtmiana3.red.telefonica-wholesale.net (84.16.12.158) 151.398 ms te9-2.ccr01.mia03.atlas.cogentco.com (154.54.12.229) 176.301 ms XE6-0-1-0-grtmiana3.red.telefonica-wholesale.net (84.16.12.158) 143.231 ms
7 te8-2.ccr01.mia01.atlas.cogentco.com (154.54.28.245) 275.548 ms ix-11-2-0-0.tcore1.MLN-Miami.as6453.net (63.243.152.49) 144.493 ms te8-2.ccr01.mia01.atlas.cogentco.com (154.54.28.245) 275.668 ms
8 te0-4-0-4.mpd21.atl01.atlas.cogentco.com (154.54.30.245) 178.142 ms if-8-0-1-0.tcore1.PV9-Lis