Skip to content

Instantly share code, notes, and snippets.

View chan-dev's full-sized avatar
💭
I may be slow to respond.

Christian M. Austria chan-dev

💭
I may be slow to respond.
View GitHub Profile
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@rgrove
rgrove / getAbsoluteBoundingRect.js
Created April 25, 2013 21:20
Simple JS function that returns a bounding rect for an element with absolute coordinates corrected for scroll positions.
/**
Returns a bounding rect for _el_ with absolute coordinates corrected for
scroll positions.
The native `getBoundingClientRect()` returns coordinates for an element's
visual position relative to the top left of the viewport, so if the element
is part of a scrollable region that has been scrolled, its coordinates will
be different than if the region hadn't been scrolled.
This method corrects for scroll offsets all the way up the node tree, so the
@Hagith
Hagith / drawing-tools.html
Created June 12, 2013 14:45
Google Maps v3 Drawing Tools
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<title>Drawing Tools</title>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script>
<style type="text/css">
#map, html, body {
@mikelehen
mikelehen / generate-pushid.js
Created February 11, 2015 17:34
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/
@lunelson
lunelson / gsap-properties-cheat-sheet.md
Last active January 28, 2024 22:07
Greensock Properties Cheat Sheet

Greensock CSS properties Cheat Sheet

I wrote this as a reference for myself because some of the property names are non-obvious, and there are a number of relevant special properties, and there is no central concise listing of them all in GSAP Docs, other than (in longer form) on the CSSPlugin page.

Standard CSS properties

...are all supported, with hyphenated-names becoming camelCaseNames. Non-animatable properties are also supported but they will be set at the beginning of the tween.

Special mentions:

@dedunumax
dedunumax / remove_all_followers.py
Last active December 15, 2022 13:57
Remove all the followers from your twitter account.
import tweepy
__author__ = 'dedunumax'
'''
This script will remove all the followers from your twitter account. For that first it will block user one by one and
then unblock them. If you are following your followers, you won't be subscribed to them anymore once you run this job.
Rub this script carefully.
Install tweepy module using pip. To install tweepy run below command in your terminal.

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@placidrod
placidrod / sublime-text-3-open-in-command-line.txt
Created June 27, 2016 07:39
Sublime Text 3 - Open in Command Line (Windows)
You can open sublime text from command line with subl.exe and subl. The second one has a problem. If sublime text is not open already,
when you open sublime text with subl, the command prompt will wait until sublime text is closed. So, you cannot do anything else in
terminal, unless you open another terminal. This is useful in some cases. But sometimes its a pain.
Method 1: Open with subl.exe
1. Go to Control Panel > Advanced System Settings -> Advanced -> Environment Variables
2. Create a new system variable called SUBLIME that will point to the folder of your Sublime installation.
Variable Name: SUBLIME
Variable Value: C:\Program Files\Sublime Text 3
@tduarte
tduarte / publish-ghpages.md
Last active March 15, 2024 05:45
If you need to force push an subtree
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@jhaynie
jhaynie / example.spec.js
Last active September 4, 2023 14:35
Cypress.io login to github with node app using passport
import url from 'url';
describe('Login', function() {
it('cy.should - assert that <title> is correct', function() {
cy.visit('http://localhost:5001');
cy.get('#login').should('contain', 'Login with Github');
cy.request({
url: '/login',
followRedirect: false
})