Skip to content

Instantly share code, notes, and snippets.

View stevenschobert's full-sized avatar

Steven Schobert stevenschobert

View GitHub Profile
@NikolayS
NikolayS / file_fdw__csv.sql
Last active October 15, 2023 02:54
Postgres: CSV file as a table using FDW
-- Installs "file_fdw" extension and creates foreign table to work with data from CSV file.
-- See also the comment below which helps to automate the process for Google Spreadsheets
-- Another option would be using Multicorn for Google Spreadsheets, but it requires additional steps
-- (see https://wiki.postgresql.org/wiki/Foreign_data_wrappers).
create extension file_fdw;
create server "import" foreign data wrapper file_fdw;
create foreign table "table1" (
col1 text,
@bsara
bsara / git-ssh-auth-win-setup.md
Last active April 22, 2024 13:49
Setup SSH Authentication for Git Bash on Windows

Setup SSH Authentication for Git Bash on Windows

Prepararation

  1. Create a folder at the root of your user home folder (Example: C:/Users/uname/) called .ssh.
  2. Create the following files if they do not already exist (paths begin from the root of your user home folder):
  • .ssh/config
@MoOx
MoOx / index.js
Last active February 9, 2024 22:44
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
@bsag
bsag / README.md
Created April 8, 2015 10:03
Marked.app private layer for Spacemacs

This is a silly little private layer I put together for Spacemacs to allow me to open the current (Markdown) buffer in Marked 2.app when I hit the key combo SPC om. Since I am very new to both Emacs and Spacemacs, I am not at all confident that the functions are in the appropriate places, and I am sure it could be done more simply. Having said all that, it works!

To activate it put the two .el files above within a folder called 'marked' within your 'private' folder (or whatever folder you have pointed dotspacemacs-configuration-layer-path at). Then you just need to add marked to your dotspacemacs-configuration-layers list in your .spacemacs.

@leonbreedt
leonbreedt / iTermColorsToTerminalColors.swift
Last active March 5, 2021 01:31
Convert iTerm2 color scheme to Terminal.app color scheme. To use, just save to disk and run it like you would any script. NOTE: Needs Xcode 8.0 or later, since it has been ported to Swift 3.0.
#!/usr/bin/xcrun swift
//
// Copyright © 2016 Leon Breedt
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@JalfResi
JalfResi / revprox.go
Last active May 2, 2024 13:27
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
#
# Refactor.tv Convert
#
# Before running, you will need to install FFMPEG with libvorbis and libvpx (for WebM)
# $ brew install ffmpeg --with-libvorbis --with-libvpx
#
# Now run the following to get started:
# $ ruby convert.rb Episode003-master.mov 003
#
@iansym
iansym / jsonview-solarized.css
Last active September 13, 2022 21:33
JSON View solarized theme for Chrome Extension
body {
background-color: #002b36;
color: #839496;
font-size: 14px;
white-space: pre !important;
font-family: "Source Code Pro", monospace;
}
.property {
font-weight: bold;