Skip to content

Instantly share code, notes, and snippets.

Fernando Crespo fcrespo82

Block or report user

Report or block fcrespo82

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 keybase.md

Keybase proof

I hereby claim:

  • I am fcrespo82 on github.
  • I am fcrespo82 (https://keybase.io/fcrespo82) on keybase.
  • I have a public key ASCl04WJAhzfhkVNvPBcVSM83DCElgpDsQ4jvBCQeK-HqQo

To claim this, I am signing this object:

@fcrespo82
fcrespo82 / Rules.md
Created Nov 14, 2017
Wall Monster (game instructions)
View Rules.md

At least 5 people:

  • Narrator
  • Normal person (crew)
  • 2 lovers (crew) (optional?)
  • Security camera (crew)
  • Baby wall monster (optional?)
  • Bodyguard (crew)
  • Wall monster

Bodyguard can choose 1 person to defend per night. If chooses a wall monster he is dragged out of the space station.

@fcrespo82
fcrespo82 / safesign.md
Created Aug 19, 2016 — forked from jonasmalacofilho/safesign.md
Instalando o SafeSign Crypto USB Token no Firefox/Linux
View safesign.md

Instalando o SafeSign Crypto USB Token no Firefox/Linux

Hardware: Giesecke & Devrient SafeSign Crypto USB Token

Sistema operacional: Ubuntu 14.04 LTS AMD 64

  1. Dependências: libccid, pcscd e libpcsclite1. Adicionalmente, é interessante instalar o pacote pcsc-tools e executar pcsc_scan para verificar a visibilidade do token.
@fcrespo82
fcrespo82 / remove.md
Last active May 20, 2016
Remove all files from a make install that do not provide a make uninstall
View remove.md

You can use make install and DESTDIR to get a clean tree of the files in the kit. The following (untested script) should delete all the files of the SVN source kit.

BE CAREFUL WITH THIS COMMAND SINCE IT USES sudo rm AND COULD DAMAGE YOUR SYSTEM.

YOU HAVE BEEN WARNED!

make install DESTDIR=/tmp/qqq
cd /tmp/qqq
@fcrespo82
fcrespo82 / count_quotation_mark.py
Created Feb 9, 2015
Script to count quotation marks in jsp
View count_quotation_mark.py
import os
import re
with open("/home/fxcrespo/workspaces/workspace_siga/count.log", "w") as thelog:
for path, dirs, files in os.walk("/home/fxcrespo/workspaces/workspace_siga"):
for thefile in files:
thepath = os.path.join(path, thefile)
if thepath.endswith("jsp"):
thecount = len(re.findall("\"", "".join(open(thepath).readlines())))
if thecount > 0 and (thecount % 2 != 0):
@fcrespo82
fcrespo82 / clockface
Last active Aug 29, 2015 — forked from drdrang/clockface
I don't know why I did it, but this version shows the minutes past the represented in the emoji
View clockface
#!/usr/bin/python
# -*- coding: utf-8 -*-
from sys import argv
from time import strftime
from math import floor
clocks = {'12:00': '🕛', '12:30': '🕧', '1:00': '🕐', '1:30': '🕜',
'2:00': '🕑', '2:30': '🕝', '3:00': '🕒', '3:30': '🕞',
'4:00': '🕓', '4:30': '🕟', '5:00': '🕔', '5:30': '🕠',
View wake_on_lan.py
#!/usr/bin/env python
# wol.py
import socket
import struct
def wake_on_lan(macaddress):
""" Switches on remote computers using WOL. """
# Check macaddress format and try to compensate.
@fcrespo82
fcrespo82 / new_gist_file.py
Created Mar 22, 2014
Pure anonymous lambda recursive function in python
View new_gist_file.py
import urllib
a=['<','<','<','<']
[ (lambda a:lambda t,v:a(t,a,v))(lambda t,s,x:t if x==0 else s(urllib.quote(t),s,x-1))(x,idx+1) for idx,x in enumerate(a) ]
@fcrespo82
fcrespo82 / .bash_completion
Last active Aug 29, 2015
A shell completion for Brett Terpstra's doing command line utility http://brettterpstra.com/projects/doing/
View .bash_completion
_doing()
{
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "$(doing help -c)" -- $cur) )
}
complete -F _doing doing
View Backup Contacts.py
import contacts
import webbrowser, urllib
from seamless_dropbox import open
import console
DRAFTS_ACTION = "Backup Contacts"
VCARD = ""
people = contacts.get_all_people()
i = 0
You can’t perform that action at this time.