Skip to content

Instantly share code, notes, and snippets.

View gpedro's full-sized avatar

Gabriel Pedro gpedro

View GitHub Profile
@felipefialho
felipefialho / aproximando-seus-estudos-de-cenarios-reais.md
Last active February 25, 2019 14:13
Aproximando seus estudos de cenários mais reais

Teoria x Prática

Aproximando seus estudos de cenários mais reais

O problema

Uma das perguntas mais comuns entre desenvolvedores iniciantes ou que ainda estão em fase de estudos, é:

@coderanger
coderanger / README.md
Last active August 18, 2023 18:33
How to patch Ubuntu for Heartbleed

How to patch Ubuntu for Heartbleed

  1. sudo apt-get update
  2. sudo apt-get install -y libssl1.0.0 openssl
  3. openssl version -a and confirm the "built on" date is >= 2014-04-07
  4. sudo lsof -n | grep ssl | grep DEL and restart all listed services.

Repeat #4 until no results are returned.

@fdaciuk
fdaciuk / Esconder_console_log.md
Last active September 3, 2021 15:00
Esconder console.log() quando o site for para produção

Esconder console.log() para o site em produção

  • Trocar o www.mywebsite.com pelo endereço do site em produção;
  • Incluir isso no início do seu script.

Se passar o parâmetro ?development na URL, ele ignora e mostra os console.log().

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 28, 2025 00:02
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@yamanyar
yamanyar / encrypt.java
Created April 7, 2012 05:08
encrypt in java
protected String encrypt(String token) throws Exception {
// Instantiate the cipher
final SecretKeySpec key = new SecretKeySpec("oldhouse".getBytes("ISO-8859-1"), "DES");
AlgorithmParameterSpec paramSpec = new IvParameterSpec("houseold".getBytes());
Cipher cipher = Cipher.getInstance("DES/CFB8/NoPadding");
cipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
byte[] binaryData = cipher.doFinal(token.getBytes("ISO-8859-1"));
return new String(org.apache.commons.codec.binary.Base64.encodeBase64(binaryData), "ISO-8859-1");
@yamanyar
yamanyar / sample.py
Created April 7, 2012 05:07
resolving in python
#!/usr/bin/python
# Rewrite URL Script for Secure Web Issue
# author: Kaan Yamanyar
from Crypto.Cipher import DES
from datetime import datetime, timedelta
import sys
import re
import base64
def parseToken(str):
@crofty
crofty / index.html
Last active October 22, 2021 08:24
A example of using Google Map tiles with the Leaflet mapping library - http://matchingnotes.com/using-google-map-tiles-with-leaflet
<!DOCTYPE html>
<html>
<head>
<title>Leaflet</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
<script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script>
</head>
<body>