Skip to content

Instantly share code, notes, and snippets.

View haroldoramirez's full-sized avatar
🎯
Focusing

Haroldo Ramirez da Nobrega haroldoramirez

🎯
Focusing
View GitHub Profile
@tanvir002700
tanvir002700 / (1) index.html
Last active June 5, 2023 14:48
Upload CSV file with Jquery.
<html>
<head>
<title>CSV upload</title>
</head>
<body>
<input type="file" name="filename" id="filename">
<button id="upload">upload</button>
<div class="csv"></div>
@lucasweb78
lucasweb78 / CustomSwaggerModelConverter.java
Last active August 29, 2015 13:57
Custom Swagger Model Converter that hides model properties that have methods annotated with a ApiModelProperty(access = "hidden") annotation.
package uk.co.lucasweb.swagger;
import com.wordnik.swagger.annotations.ApiModelProperty;
import com.wordnik.swagger.converter.SwaggerSchemaConverter;
import com.wordnik.swagger.model.Model;
import org.apache.log4j.Logger;
import scala.Option;
import scala.collection.immutable.Map;
import javax.xml.bind.annotation.XmlElement;
@ecowden
ecowden / angular-partial-cache-busting
Created January 25, 2013 21:01
Cache busting for AngularJS partials is easy
/*
* Decide on your cache-busting strategy. In this example, we use the current timestamp, which will
* force a change every time the app is visited, but not every time the partial is loaded within a
* visit. Even better would be to use a hash of the file's contents to ensure that the file is always
* reloaded when the file changes and never reloaded when it isn't.
*/
var cacheBustSuffix = Date.now();
// Optionally, expose the cache busting value as a constant so other parts of your app can use it.
ngModule.constant("cacheBustSuffix", cacheBustSuffix);
@thiagosilr
thiagosilr / paisesPortuguesIngles.sql
Created November 9, 2012 13:30
Tabela MYSQL com o nome de todos os países em Português / Inglês
--
-- Estrutura da tabela `pais`
--
CREATE TABLE IF NOT EXISTS `pais` (
`paisId` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`paisNome` varchar(50) NOT NULL,
`paisName` varchar(50) NOT NULL,
PRIMARY KEY (`paisId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=253 ;
@manfe
manfe / dump.sql
Created October 29, 2012 19:27
Postgres - Estados e Cidades Brasileiras, dados extraídos do site do IBGE - SQL
-- Os dados contidos nesse arquivo foram extraídos do site: http://ibge.gov.br/cidadesat utilizando ruby, nokogiri e expressões regulares.
-- Autor: Mauricio Natanael Ferreira
-- Github: https://github.com/manfe
-- Twitter: @manfe01
-- Email: contato [at] ferreiramauricio [dot] com
-- ***********************************************************************************************************************************************
-- id ...
@tagliati
tagliati / marcha_imperial
Created February 11, 2012 20:42
Marcha imperial para arduino
int ledPin = 13;
//led for visualization (use 13 for built-in led)
int speakerPin = 11;
//speaker connected to one of the PWM ports
#define c 261
#define d 294
#define e 329
#define f 349
@greenido
greenido / fileBrowserHandler.htm
Created May 18, 2011 22:47
Simple test to FileSystem APIs (HTML5)
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>Chrome File API tester</title>
<script>
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
@rogerleite
rogerleite / install_monaco_font.sh
Last active April 27, 2024 05:27
Install Monaco font in Linux
#!/bin/bash
# Install Monaco font in Linux
# Version from nullvideo https://gist.github.com/rogerleite/99819#gistcomment-2799386
sudo mkdir -p /usr/share/fonts/truetype/ttf-monaco && \
sudo wget https://gist.github.com/rogerleite/b50866eb7f7b5950da01ae8927c5bd61/raw/862b6c9437f534d5899e4e68d60f9bf22f356312/mfont.ttf -O - > \
/usr/share/fonts/truetype/ttf-monaco/Monaco_Linux.ttf && \
sudo fc-cache