⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env runhaskell | |
-- This example uses the hslogger library. | |
-- For debugging it may be more convenient to use Debug.Trace instead since that | |
-- allows you to log debugging output from otherwise pure functions. | |
import System.IO (stderr, Handle) | |
import System.Log.Logger (rootLoggerName, setHandlers, updateGlobalLogger, | |
Priority(INFO), Priority(WARNING), infoM, debugM, | |
warningM, errorM, setLevel) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property baseURL : "http://statusboard.dev/song?" | |
if application "Spotify" is running then | |
tell application "Spotify" | |
set theTrack to name of the current track | |
set theArtist to artist of the current track | |
set theAlbum to album of the current track | |
set theurl to spotify url of the current track | |
try | |
do shell script "/usr/local/bin/wget --delete-after \"" & baseURL & "&t=" & theTrack & "&a=" & theArtist & "&al=" & theAlbum & "\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# load resources | |
xrdb -merge .Xresources | |
#xsetroot -solid '#222'& | |
# map caps lock as extra escape | |
xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'& | |
# start clipboard manager | |
parcellite& |
This is my xmonad+unity panel config. With this config, you'll have a well integrated panel from unity but still have xmonad as your window manager with your gnome apps, including the pretty gnome-terminal
(for those too lazy to learn xmoobar).
This config doesn't have the unity launcher, mainly becuse it causes windows to be unfloatable, besides I'm not fond of it anymore.
Copy and paste these lines (or understand what it does and do it manually).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- * Stuff | |
import Database.SQL (connectDB, dbquery) | |
import Database.Cache (cacheGet, cacheSet) | |
import Network.SOAP (soap) | |
import Control.Monad (guard) | |
type Oven = String | |
type Product = String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Emacs starter for Emacs mac port | |
# Thanks to Aquamacs Project and David Reitter | |
my $args = ""; | |
my $tmpfiles = ""; | |
for my $f (@ARGV) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> module Paxos.Basic where | |
> import Data.List (maximumBy) | |
> import Data.Maybe (catMaybes) | |
Phase 1a: Prepare | |
================= | |
A Proposer (the leader) creates a proposal identified with a number N. This | |
number must be greater than any previous proposal number used by this Proposer. | |
Then, it sends a Prepare message containing this proposal to a Quorum o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
module EkgJsonParser where | |
import Data.Aeson | |
import Data.Aeson.Types | |
import Control.Monad | |
import Data.ByteString.Lazy |
OlderNewer