Skip to content

Instantly share code, notes, and snippets.

View pmarquees's full-sized avatar
💭
🍜

Pedro Marques pmarquees

💭
🍜
View GitHub Profile
@pmarquees
pmarquees / button.js
Last active September 20, 2016 22:09
import React from 'react'; // This imports the react library
import './styles.css' // In this case I chose to import the styles from a separate file
const Button = ({
type = 'default' // this is the parameter you'll be able to define in the HTML
cta = '',
children, // by defining children as a parameter you are making it available to be used inside the component
}) => (
<button className={`button-base ${type}`}>
<p>{cta || children}</p>
{
"_args": [
[
"skpm@^0.8.0",
"/Users/pmarques/Documents/Projects/react-sketchapp/examples/basic-setup"
]
],
"_from": "skpm@>=0.8.0 <0.9.0",
"_id": "[email protected]",
"_inCache": true,
@pmarquees
pmarquees / framerx.tsx
Created August 6, 2018 09:42
Framer X props on dev environment
static propertyControls: PropertyControls<Props> = process.env.NODE_ENV === 'development'
? {
title: { type: ControlType.String, title: "Title" },
},
}
: null;
plugin.run = (contents, options) ->
"""
#{contents}
# Input component, collapse this so you can read your file properly
{InputLayer} = require "input"
# Loop to all layers and find the inputs
inputs = Framer.CurrentContext._layers.filter((a) =>
Events.EnterKey = "EnterKey"
Events.SpaceKey = "SpaceKey"
Events.BackspaceKey = "BackspaceKey"
Events.CapsLockKey = "CapsLockKey"
Events.ShiftKey = "ShiftKey"
Events.ValueChange = "ValueChange"
Events.InputFocus = "InputFocus"
Events.InputBlur = "InputBlur"
class exports.InputLayer extends TextLayer
@pmarquees
pmarquees / bookmarklet.js
Last active February 26, 2019 09:54
Open in Figma (bookmarklet)
javascript:(function(){var url=window.location.href;var trimmed=url.slice(21);window.location.href=`figma:/${trimmed}`})()
@pmarquees
pmarquees / editPage.js
Last active October 7, 2024 23:59
Edit page (bookmarklet)
javascript:document.body.contentEditable = 'true'; document.designMode='on'; void 0
@pmarquees
pmarquees / readme.md
Last active April 29, 2022 08:22
Youtube Picture in picture

Youtube Picture-in-pitcure

Picture-in-Picture (PiP) allows users to watch videos in a floating window (always on top of other windows) so they can keep an eye on what they’re watching while interacting with other sites, or applications. Watch YouTube videos in Picture in Picure without installing any extensions by using the "new" requestPictureInPicture

How to use

  1. Add a new bookmark.
  2. Copy youtubePip.js and paste it into the URL field of the bookmark.
  3. Save.
  4. Click the bookmarklet in a YouTube tab and voilá!
import SwiftUI
import MapKit
import CoreLocation
@main
struct ISSApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}