Skip to content

Instantly share code, notes, and snippets.

View insinfo's full-sized avatar

Isaque Neves insinfo

  • Prefeitura de Rio das Ostras
  • Rio de Janeiro - Brasil
View GitHub Profile
@seltzered
seltzered / IllustratorSaveAsSVGs.jsx
Last active May 13, 2024 10:33
Quick little script to batch-convert Illustrator .ai's to .svg's, based on Adobe's sample 'save to pdf's' script. Save it to a jsx, and load it under illustrator. Intended for Illustrator CS6.
/**********************************************************
ADOBE SYSTEMS INCORPORATED
Copyright 2005-2010 Adobe Systems Incorporated
All Rights Reserved
NOTICE: Adobe permits you to use, modify, and
distribute this file in accordance with the terms
of the Adobe license agreement accompanying it.
If you have received this file from a source

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

/*Transparent pattern placed over an image, like we see on the bootstrap homepage: http://twitter.github.com/bootstrap/index.html*/
div {
width: 200px;
height: 200px;
display: block;
position: relative;
background: url(images/background-image.png);
}
/**
* huffman.c
* Um simples compressor de arquivos usando árvores de Huffman.
* @ver 0.1
* @autores: Fabrício Soares
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@getmanzooronline
getmanzooronline / php_substring_html.php
Last active September 10, 2023 20:53
PHP Substring without breaking words and HTML tags
<?php
/**
* Truncates text.
*
* Cuts a string to the length of $length and replaces the last characters
* with the ending if the text is longer than length.
*
* @param string $text String to truncate.
* @param integer $length Length of returned string, including ellipsis.
* @param string $ending Ending to be appended to the trimmed string.
// g++ test.cpp --std=c++11 -lpthread -O2
//#ifdef WIN32 <- stdafx breaks this ifdef...
//#include "stdafx.h"
//#endif
#include <iostream>
#include <atomic>
#include <thread>
#include <vector>
@dmail
dmail / object-fit-cover-video.js
Created October 5, 2015 06:50
object-fit:cover polyfill on video element using canvas
// http://stackoverflow.com/questions/21961839/simulation-background-size-cover-in-canvas
function drawImageProp(ctx, img, x, y, w, h, offsetX, offsetY) {
if (arguments.length === 2) {
x = y = 0;
w = ctx.canvas.width;
h = ctx.canvas.height;
}
// default offset is center
offsetX = typeof offsetX === "number" ? offsetX : 0.5;
@ryanpadilha
ryanpadilha / AssinarXML.cs
Created March 26, 2016 01:28
Assinatura Digital XML x509 v3
// declarando variaveis e enumerador necessarios
enum ResultadoAssinatura
{
XMLAssinadoSucesso,
CertificadoDigitalInexistente,
TagAssinaturaNaoExiste,
TagAssinaturaNaoUnica,
ErroAssinarDocumento,
XMLMalFormado,
ProblemaAcessoCertificadoDigital
@DevWellington
DevWellington / bot-send-message.js
Last active November 6, 2021 16:41
bot web.whatsapp.com - send message for a contacts list
var script = document.createElement('script');
script.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(script);
// search contact
function searchContact(searchValue, interval_add)
{
var interval = interval_add;
var count = 1;
package com.company; //used for IntelliJ Idea
/*SHA1 Hash Implementation
//Authors: John Aromando/Matt Fishman
//
//Takes in plain text and returns the HexString value of the 160 number result.
//The project will return the plain text, the Decimal, Binary, and Hex values of the plain text and the result of the program.
//Spaces are acceptable when providing the plain text.
//
*/