Skip to content

Instantly share code, notes, and snippets.

View chriskaukis's full-sized avatar

Chris chriskaukis

View GitHub Profile
@msluyter
msluyter / gist:1925069
Created February 27, 2012 16:22
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@areinisc
areinisc / README.md
Last active September 3, 2018 13:20
PHOTOMETRY --- doom-emacs -- automatic theme adjustment based on ambient light

Adding automatic light/dark theme switching to doom-emacs running on a mac with ambient light sensor.

Idea adapted from: Matt Bilyeu https://matthewbilyeu.com/blog/2018-04-09/setting-emacs-theme-based-on-ambient-light

Installation

  1. Make the lmutracker executable using clang and place it in your custom doom directory:
    $ cd ~/.doom.d/    # start in your custom doom directory, wherever that is for you.
    

$ touch lmutracker.mm # copy in the contents of this file however you like

@nicbet
nicbet / _Webpack-Fontawesome-Bootstrap-Phoenix.md
Last active April 28, 2020 05:43
Sass versions of Bootstrap 4 and Fontawesome 5 with Elixir / Phoenix Framework 1.3.x and 1.4.x using Webpack

SASS Versions of

  • Fontawesome 5
  • Bootstrap 4

in Phoenix 1.3 and 1.4 via Webpack

@wrabit
wrabit / _bootstrap_bulma_helpers.scss
Last active September 8, 2020 17:21
Bootstrap style responsive helper utilities for Bulma
/*
Start Bootstrap style responsive spacer helper
Utilities for spacing, text and float
*/
$spacer: 1rem !default;
$spacers: () !default;
$spacers: map-merge((
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
module Bencoding where
import Control.Applicative
import Crypto.Hash.SHA1
import Data.Attoparsec.ByteString.Char8 (Parser)
import qualified Data.Attoparsec.ByteString.Char8 as P
import Data.ByteString as B
import Data.ByteString.Char8 as BC
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@gshaw
gshaw / carrier_wave.rb
Created August 14, 2014 19:06
CarrierWave initialization file for testing with fixtures and support S3 in staging and production.
# NullStorage provider for CarrierWave for use in tests. Doesn't actually
# upload or store files but allows test to pass as if files were stored and
# the use of fixtures.
class NullStorage
attr_reader :uploader
def initialize(uploader)
@uploader = uploader
end
//
// FreeDrawingImageView.swift
//
// Created by Besher on 2018-12-30.
// Copyright © 2018 Besher Al Maleh. All rights reserved.
//
import UIKit
class FreeDrawingImageViewDrawLayer: UIView {
@Wunkolo
Wunkolo / compact.cpp
Last active March 15, 2023 02:36
Ascii Raymarcher(old)
#include <math.h>
#include <algorithm>
#include <string>
#include <immintrin.h>
using namespace std;typedef float R;
#define _W 79
#define _H 39
#define EP 0.01f
#define OP operator
#define C const
@thealexcons
thealexcons / jwt_golang_example.go
Last active April 16, 2023 03:04
JSON Web Tokens in Go
package main
import (
"io/ioutil"
"log"
"strings"
"net/http"
"encoding/json"
"fmt"
"time"