Skip to content

Instantly share code, notes, and snippets.

# Insomnia Configuration
## Run the test query
{
shop {
id
name
}
}
# Query Structure Examples
@karol-majewski
karol-majewski / App.tsx
Last active May 13, 2022 22:18
Generic React components in TypeScript
import * as ReactDOM from 'react-dom';
import { List } from '../components';
ReactDOM.render(
<List
items={[1, 2, 3]}
renderItem={item => <li key={item}>{item.toPrecision(3)}</li>}
wrapper={({ children }) => <ul>{children}</ul>}
/>,
/* removes content from page layout but keeps information available to accessibility APIs */
.visually-hidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
@koshatul
koshatul / README.md
Last active October 9, 2024 07:06
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@elijahmanor
elijahmanor / agnoster.zsh-theme
Created November 21, 2017 14:05
Custom Agnoster Zsh Theme to Add Node & Npm Versions
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
@floriancourgey
floriancourgey / setup-elementary.sh
Last active September 5, 2018 05:51
Things to do after installing elementary OS Loki 0.4
# chromium
sudo apt install -y chromium-browser
# dev (php, docker, git, node, bower, electron, composer)
sudo apt install -y \
php php-curl php-mysql \
docker.io \
git \
nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
@bag-man
bag-man / database.js
Last active July 22, 2019 22:46
Connect and use MongoDB with ES6 in Node 4
'use strict'
const MongoClient = require('mongodb')
class Database {
constructor (uri) {
this.uri = uri
this.db = {}
return this
@coderdiaz
coderdiaz / routes.php
Created February 21, 2016 06:23 — forked from lukemartin/routes.php
Output checkboxes with appropriate 'checked' attributes in Laravel
Route::get('edit', function() {
// fetch our post, and it's associated categories
$post = Post::with('cats')->where('id', '=', $id)->first();
// fetch all of our categories
$cats = Cat::all();
// create our empty array
$post_cats = array();
@nucliweb
nucliweb / Curso-DevTools.md
Last active April 8, 2021 03:46
Desarrollo Frontend con Developer Tools