Skip to content

Instantly share code, notes, and snippets.

View jordimassaguerpla's full-sized avatar

Jordi Massaguer Pla jordimassaguerpla

View GitHub Profile
@jordimassaguerpla
jordimassaguerpla / gist:47794517829f08c8d6f9bb288912ddad
Created April 28, 2021 16:24 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
from github import Github
import os, sys
import yaml
# TOOD: this vars should come from the command line
github_token = os.environ["GITHUB_TOKEN"]
username = os.environ("GITHUB_USERNAME"]
release_file = "release.yaml"
release_project = "test_release"
@jordimassaguerpla
jordimassaguerpla / rubysec_get_stats.rb
Created July 6, 2017 11:02
get ruby security statistics based on [email protected]:rubysec/ruby-advisory-db.git
require "yaml"
if ARGV.length != 1
puts "usage: ruby get_stats.rb YEAR"
exit -1
end
if ARGV[0] !~ /\d\d\d\d/
puts "usage: ruby get_stats.rb YEAR"
exit -2
end
year = Integer(ARGV[0])
@jordimassaguerpla
jordimassaguerpla / Dockerfile_opensuse_leap_vulnerable
Created June 27, 2016 11:18
Docker file for creating an opensuse vulnerable image
FROM opensuse:leap
MAINTAINER Jordi
# openssh-6.6p1-6.3 contains at least this vulnerability
# https://lists.opensuse.org/opensuse-updates/2016-01/msg00038.html
# CVE-2016-0777 and CVE-2016-0778
# Which is considered a security issue of level *critical*
RUN zypper -n install --oldpackage openssh-6.6p1-6.3
# copy this file as Dockerfile

Keybase proof

I hereby claim:

  • I am jordimassaguerpla on github.
  • I am jordi_m_p (https://keybase.io/jordi_m_p) on keybase.
  • I have a public key whose fingerprint is 6D6D 82FF F63E AC94 9526 C4CE C053 1054 598C 0AE7

To claim this, I am signing this object:

@jordimassaguerpla
jordimassaguerpla / zypper-docker-demo-cve-2014-6271.txt
Created December 1, 2015 15:39
zypper-docker demo for cve-2014-6271
-----------Dockerfile ---------------------------------------------------------------
FROM suse/sles11sp3:latest
MAINTAINER Jordi Massaguer <[email protected]>
# Import the crt file of our private SMT server
ADD http://docker-smt.suse.de//smt.crt /etc/ssl/certs/smt.pem
RUN c_rehash /etc/ssl/certs
# Refresh the list of repositories
@jordimassaguerpla
jordimassaguerpla / dockerfile
Last active December 1, 2015 14:22
netcat docker example
FROM opensuse:latest
MAINTAINER Jordi Massaguer "[email protected]"
RUN echo -e "#!/bin/sh\n \nnc -l 80" > /bin/hello-world-server
RUN chmod +x /bin/hello-world-server
RUN zypper -n install "netcat-openbsd"
EXPOSE 80
CMD /bin/hello-world-server
# test me with "telnet IP 80"
# get the ip with docker inspect CONTAINER
# Use this ruby script on a rubysec/ruby-advisory-db checkout
# to get the number of security issues on ruby gems per year
require "yaml"
if ARGV.length != 1
puts "usage: ruby get_stats.rb YEAR"
exit -1
end
if ARGV[0] !~ /\d\d\d\d/
puts "usage: ruby get_stats.rb YEAR"
@jordimassaguerpla
jordimassaguerpla / get_download_link_from_obs
Created June 15, 2015 10:45
get download link for a binary in open suse build service
@jordimassaguerpla
jordimassaguerpla / create_default_pool_for_libvirt
Created June 12, 2015 11:04
create_default_pool_for_libvirt
mkdir -p /var/lib/virt/
virsh pool-define-as --name default --type dir --target /var/lib/virt/images
virsh pool-autostart default
virsh pool-build default
virsh pool-start default