Skip to content

Instantly share code, notes, and snippets.

View bartek's full-sized avatar
🐗

Bartek Ciszkowski bartek

🐗
View GitHub Profile
<!--
Put this file in ~/Library/LaunchAgents/com.example.KeyRemapping.plist to
automatically remap your keys when macOS starts.
See https://developer.apple.com/library/archive/technotes/tn2450/_index.html for
the key "usage IDs". Take the usage ID and add 0x700000000 to it before putting it
into a source or destination (HIDKeyboardModifierMappingSrc and
HIDKeyboardModifierMappingDst respectively).
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@enricofoltran
enricofoltran / main.go
Last active June 26, 2024 12:16
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
1 pound of pinto beans 6 cups water 1 yellow onion 3 teaspoons cumin 2-3
tablespoons dark chili powder (optional...not totally authentic but I like it)
Soak beans overnight in a big pot full of cold water. In the morning, discard
water and thoroughly rinse the beans. Chop one onion. Add beans, chopped
onion, water, and cumin (and optional chili powder) to instant pot. Stir. Cook
on high pressure for 15 minutes, cut power, and allow to depressurize
naturally. Remove lid and add salt to taste (careful--not too much salt). Once
you have them tasting good, you now have borracho beans (literally: "drunk
beans"). For refried beans, drain and discard all water. Put beans in the
1 pound red kidney beans 1 link of Hillshire Farms smoked sausage (like polish
style) 1 celery stalk 1 yellow onion 1-2 bay leaves Ground cayenne pepper Brown
rice or long-grain white rice Crystal brand hot sauce
This is my pressure cooker adaptation of my mother-in-law's recipe.
Rinse 1 pound of red kidney beans, then cover with 3-4" of water and soak
overnight. The next morning, dump the water and rinse them thoroughly.
Chop one medium-sized yellow onion and one celery stalk.
@QuantumGhost
QuantumGhost / example.puml
Last active March 23, 2024 22:39
A simple template for PlantUML to draw ER diagram.The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
@wolever
wolever / .babelrc
Last active November 5, 2015 21:40
Adding Babel (ES6) to a legacy project being built with webpack
{
// Enable all the features, including `::`-binding (ex, `setTimeout(::this.foo, 1000)`)
"stage": 0
}
@gblmarquez
gblmarquez / .tmux.conf
Created August 6, 2015 14:28
.tmux.conf with fish as default shell
# Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal screen-256color
# support logging out and back in
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
# pbcopy support
set-option -g default-command "reattach-to-user-namespace -l bash"
# vi mode
@devknoll
devknoll / gist:8b274f1c5d05230bfade
Last active June 13, 2022 00:07
Basic GraphQL example using the GitHub API
import { graphql, GraphQLString, GraphQLInt } from 'graphql';
import { objectType, enumType, schemaFrom, listOf } from 'graphql-schema';
import request from 'promisingagent';
const repositorySortEnum = enumType('RepositorySort')
.value('CREATED', 'created')
.value('UPDATED', 'updated')
.value('PUSHED', 'pushed')
.value('FULL_NAME', 'full_name')
.end();
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active July 2, 2024 09:21
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)