Skip to content

Instantly share code, notes, and snippets.

View theuves's full-sized avatar
🎯
Focusing

Matheus Alves theuves

🎯
Focusing
  • Mato Grosso do Sul, Brazil
  • 23:28 (UTC -04:00)
View GitHub Profile
@felipenmoura
felipenmoura / mind3rd-demo_pt
Created April 14, 2011 15:45
An example of code to be used in Portuguese for theWebMind 3rd version
Cada professor pode ter um ou vários alunos sendo que todo aluno tem muitos professores.
Também, aluno tem uma mãe, pai e animal de estimação.
Tanto aluno quanto professor tem nome:varchar(255), idade:int e sexo:char(1).
Pai e mãe tem cpf:char(11, obrigatório, chave);
@bobspace
bobspace / css_colors.js
Last active June 24, 2024 13:46
All of the CSS Color names in a big javascript object.
// CSS Color Names
// Compiled by @bobspace.
//
// A javascript object containing all of the color names listed in the CSS Spec.
// This used to be a big array, but the hex values are useful too, so now it's an object.
// If you need the names as an array use Object.keys, but you already knew that!
//
// The full list can be found here: https://www.w3schools.com/cssref/css_colors.asp
// Use it as you please, 'cuz you can't, like, own a color, man.
@miloplacencia
miloplacencia / lazyload.js
Created October 22, 2012 14:39
lazyload.js (c) Lorenzo Giuliani
/* lazyload.js (c) Lorenzo Giuliani
* MIT License (http://www.opensource.org/licenses/mit-license.html)
*
* expects a list of:
* `<img src="blank.gif" data-src="my_image.png" width="600" height="400" class="lazy">`
*/
!function(window){
var $q = function(q, res){
if (document.querySelectorAll) {
@alloyking
alloyking / font-exist.js
Created November 27, 2012 14:27
Check if font exists
//
// Call this function and pass in the name of the font you want to check for availability.
//
function doesFontExist(fontName) {
// creating our in-memory Canvas element where the magic happens
var canvas = document.createElement("canvas");
var context = canvas.getContext("2d");
// the text whose final pixel size I want to measure
var text = "abcdefghijklmnopqrstuvwxyz0123456789";
@kentcdodds
kentcdodds / KentsBlog.md
Created June 20, 2013 12:35
Introduction to my Gist Blog

Gist Blog by Kent Dodds

I have decided to stop using WordPress and move completely over to Gists and Google+. Whenever I want to make a post about code, I'll post it to Gist. Whenever I want to make another kind of post, I'll post it to Google+ with the hashtag #blogpost. Doing this will make life easier and I wont have to manage a CMS like WordPress or anything. It'll be great :) So what are you waiting for? Go ahead and read my Gist Blog and checkout my Google+ Blog Posts :)

@builtbylane
builtbylane / angular-remove-white-space-filter.js
Created October 30, 2013 18:43
AngularJS – filter: removes white space from text. useful for html values that cannot have spaces
/**
* Description:
* removes white space from text. useful for html values that cannot have spaces
* Usage:
* {{some_text | nospace}}
*/
app.filter('nospace', function () {
return function (value) {
return (!value) ? '' : value.replace(/ /g, '');
@rxaviers
rxaviers / gist:7360908
Last active July 23, 2024 21:25
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:
@kerimdzhanov
kerimdzhanov / random.js
Last active June 25, 2024 19:41
JavaScript: get a random number from a specific range
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}
@mlynch
mlynch / autofocus.js
Last active August 24, 2022 15:03
AngularJS Autofocus directive
/**
* the HTML5 autofocus property can be finicky when it comes to dynamically loaded
* templates and such with AngularJS. Use this simple directive to
* tame this beast once and for all.
*
* Usage:
* <input type="text" autofocus>
*
* License: MIT
*/
@mahammad
mahammad / firefox-developer-edition.md
Last active June 21, 2024 22:26
How To install Firefox Developer Edition and create desktop icon for Ubuntu 14.04 LTS

chose other install way

  1. Open Terminal Ctrl+Alt+T Download Firefox Developer Edition tar file

    wget https://download.mozilla.org/?product=firefox-aurora-latest-ssl&os=linux64&lang=en-US

  2. Copy tar file to opt sudo cp -rp firefox-35.0a2.en-US.linux-x86_64.tar.bz2

  3. Open opt folder (cd /opt/) and untar file sudo tar xjf firefox-35.0a2.en-US.linux-x86_64.tar.bz2