Skip to content

Instantly share code, notes, and snippets.

View Cordazar's full-sized avatar

Ricard Fredin Cordazar

View GitHub Profile
@estrattonbailey
estrattonbailey / Dropzone.tsx
Created March 25, 2020 16:47
Enhanced Dropzone - react-dropzone
import * as React from 'react';
import { useDropzone, DropzoneProps, DropzoneState } from 'react-dropzone';
import { Omit } from '@utils/typescript';
import Box from '@components/Box';
import { Button } from '@components/Button';
import { H5, P } from '@components/Typography';
import IconCircleCheckFull from '@icons/CircleCheckFull';
@lopspower
lopspower / README.md
Last active September 23, 2024 03:01
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@iamnewton
iamnewton / README.md
Created February 11, 2015 23:53
Responsible Social Share Links

Share URLs

Here’s a collection of common social share URLs and examples of their structures along with links to documentations.

(The code has been broken up into several lines for readability—remember to remove any spaces and line breaks in the href if you copy & paste.)

Taken from Responsible Social Share Links

var passwordStrength = {
REGEX_PASSWORD_ONE_UPPERCASE : /^(?=.*[A-Z]).*$/, //Should contain one or more uppercase letters
REGEX_PASSWORD_ONE_LOWERCASE : /^(?=.*[a-z]).*$/, //Should contain one or more lowercase letters
REGEX_PASSWORD_ONE_NUMBER : /^(?=.*[0-9]).*$/, //Should contain one or more number
REGEX_PASSWORD_ONE_SYMBOL : /^(?=.*[!@#$%&_]).*$/, //Should contain one or more symbol
checkStrength: function (password) {
length = password.length;
//Will contain password strength
@joyrexus
joyrexus / README.md
Last active September 16, 2024 18:48 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@DDtMM
DDtMM / changeElementType.js
Last active December 19, 2015 22:49 — forked from etienned/changeElementType.js
This version chains, returning a jquery object with updated children.
(function ($) {
$.fn.changeElementType = function (newType) {
var attrs, elem, $elem;
for (var i = 0, il = this.length; i < il; i++) {
attrs = {};
$elem = $(elem = this[i]);
$.each(elem.attributes, function (index, attr) {
attrs[attr.nodeName] = attr.nodeValue;
});
@zoomix
zoomix / agnoster-light.zsh-theme
Created October 3, 2012 14:39
agnoster zsh light theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#
$.fn.setAllToMaxHeight = function(){
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) );
}
// usage: $(‘div.unevenheights’).setAllToMaxHeight();