Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Gus Garzaki gugadev

🎯
Focusing
Block or report user

Report or block gugadev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gugadev
gugadev / ce-pragma.ts
Created Jul 8, 2019
JSX Pragma for better Custom Element tooling
View ce-pragma.ts
import React, { FunctionComponent, ReactChild } from 'react'
const listeners = Symbol('jsx-web-comp/event-listeners')
const eventPattern = /^onEvent/
const toKebabCase = (str: string) => str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase()
export default function jsx (type: string | FunctionComponent, props: Record<string, any>, ...children: ReactChild[]) {
const isCustomElement = customElements.get(type as string)
const newProps = { ...props }
@gugadev
gugadev / observables.ts
Last active Jan 18, 2019
RxJs Observables
View observables.ts
import chalk from 'chalk';
import {
Observable,
Observer,
Subscription,
Subject,
Subscriber,
ConnectableObservable,
BehaviorSubject,
ReplaySubject,
@gugadev
gugadev / README.md
Last active Oct 26, 2018
IP Locator
View README.md
yarn install
yarn run shit --ip=<ip here>
@gugadev
gugadev / oops.css
Created Jul 20, 2018
React SVG 404 animation
View oops.css
.oops {
margin: 0;
padding: 0;
background-color: #0a1821;
flex: 1;
height: 100%;
width: 100%;
color: #fff;
position: relative;
text-align: center;
View install-powershell-core-on-ubuntu16.sh
# Import the public repository GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
# Register the Microsoft Ubuntu repository
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
# Update apt-get
sudo apt-get update
# Install PowerShell
View embed-gist-in-blogger.js
At the end of your Blogger post , using HTML editor, append this
<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>
In the content of your blog post, simply add this:
<div class="gistLoad" data-id="8488564" id="gist-8488564">Loading https://gist.github.com/8488564....</div>
Note: adding the URL is useful because when the javascript does not work, readers can copy and paste the URL themselves.
@gugadev
gugadev / course.py
Last active Jan 18, 2018
Modelos para ER Universidad
View course.py
from peewee import *
from models.base import BaseModel
class Course(BaseModel):
name = TextField()
credits = IntegerField()
@gugadev
gugadev / gist:3e7e4b608b83771165ded4e7743efa8b
Created Oct 19, 2017 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View gist:3e7e4b608b83771165ded4e7743efa8b
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@gugadev
gugadev / toolbar.cson
Created Aug 15, 2017
Atom Flex Toolbar configuraiton
View toolbar.cson
[
{
type: 'button'
tooltip: 'Open File'
callback: 'application:open-file'
icon: 'document'
iconset: 'ion'
},
{
type: 'button'
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
You can’t perform that action at this time.