Skip to content

Instantly share code, notes, and snippets.

@vidaaudrey
vidaaudrey / ie67891011-css-hacks.txt
Created June 19, 2016 20:52 — forked from ricardozea/ie67891011-css-hacks.txt
IE CSS hacks - IE6, 7, 8, 9, 10, 11
IE6 Only
==================
_selector {...}
IE6 & IE7
==================
*html or { _property: }
IE7 Only
==================
# Defines all Languages known to GitHub.
#
# type - Either data, programming, markup, prose, or nil
# aliases - An Array of additional aliases (implicitly
# includes name.downcase)
# ace_mode - A String name of the Ace Mode used for highlighting whenever
# a file is edited. This must match one of the filenames in http://git.io/3XO_Cg.
# Use "text" if a mode does not exist.
# wrap - Boolean wrap to enable line wrapping (default: false)
# extensions - An Array of associated extensions (the first one is
@vidaaudrey
vidaaudrey / React .gitignore
Created December 30, 2015 07:11
React Gitignore
node_modules
ncp-debug.log
npm-debug.log
bower_component
src/config/configSec.js
.DS_STORE
node_modules
*~
*.pyc
@vidaaudrey
vidaaudrey / gist:94d39955c6d4f0db22e6c1fe298b1a53
Created January 8, 2018 06:56 — forked from jaydson/gist:1780598
How to detect a click event on a cross domain iframe
var myConfObj = {
iframeMouseOver : false
}
window.addEventListener('blur',function(){
if(myConfObj.iframeMouseOver){
console.log('Wow! Iframe Click!');
}
});
document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){
@vidaaudrey
vidaaudrey / cloudSettings
Last active May 27, 2019 20:49
Visual Studio Code Settings Sync Gist [vscode]
{"lastUpload":"2019-05-27T19:47:59.784Z","extensionVersion":"v3.2.9"}
@vidaaudrey
vidaaudrey / cloudSettings
Last active May 25, 2019 04:39
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-05-25T04:39:09.973Z","extensionVersion":"v3.2.9"}
@vidaaudrey
vidaaudrey / click-outide.jsx
Created March 21, 2019 15:53 — forked from andrei-cacio/click-outide.jsx
Clickoutside updated
import React, { Component, useEffect, useCallback } from "react";
function ClickOutsideH({ children, onClick }) {
const refs = React.Children.map(children, () => React.createRef());
const handleClick = useCallback(e => {
const isOutside = refs.every(ref => {
return !ref.current.contains(e.target);
});
if (isOutside) {
onClick();
@vidaaudrey
vidaaudrey / baseConverter.js
Created April 27, 2018 04:59 — forked from faisalman/baseConverter.js
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
const isEmpty = value => value === undefined || value === null || value === '';
const join = (rules) => (value, data) => rules.map(rule => rule(value, data)).filter(error => !!error)[0 /* first error */ ];
export function email(value) {
// Let's not start a debate on email regex. This is just for an example app!
if (!isEmpty(value) && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value)) {
return 'Invalid email address';
}
}
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#