Skip to content

Instantly share code, notes, and snippets.

@dphase
dphase / hack-your-own-slack-theme.md
Created September 21, 2021 13:47 — forked from focus97/hack-your-own-slack-theme.md
How to theme Slack (Dark, Solarized, White, Rosé, whatever)

How to theme Slack v4.12.0+

Update as of 8.08.2021:

  • Hid the bookmarks bar and fine-tuned some header styles.

If you want to add your own style to Slack, here's how.

My quazi-Tron Theme'ish?

I dunno what happened. I just wanted to try something sporty/future-y, I guess. Code for this is directly below.

html {
background: #0e0f12 !important;
}
body {
background: #0e0f12 !important;
color: #e6e6e6;
font-family: 'Sudo Nerd Font' !important;
font-size: 16px !important;
}
# ╔═════════════════════════════════════╦═══════════════════════════════╗
# ║ _ ____ _ ║ _ ║─┐
# ║ __| | _ \| |__ __ _ ___ ___ ║ | |_ _ __ ___ _ ___ __ ║ │
# ║ / _` | |_) | '_ \ / _` / __|/ _ \ ║ | __| '_ ` _ \| | | \ \/ / ║ │
# ║ | (_| | __/| | | | (_| \__ \ __/ ║ | |_| | | | | | |_| |> < ║ │
# ║ \__,_|_| |_| |_|\__,_|___/\___| ║ \__|_| |_| |_|\__,_/_/\_\ ║ │
# ║ ║ ║ │
# ╚═════════════════════════════════════╩═══════════════════════════════╝ │
# └──────────────────────────────────────────────────────────────────────┘
" Language Specific scratch buffers with date
" ---------------------------------------------------------------------------------
function! s:DScratch(scratch_ft)
let scratch_dir = '~/Dropbox/scratch/buffers'
let scratch_date = strftime('%Y%m%d')
let scratch_file = 'scratch-'. scratch_date . '.' . a:scratch_ft
let scratch_buf = bufnr(scratch_file)
if scratch_buf == -1
exe 'split ' . scratch_dir . '/' . scratch_file
#!/usr/bin/ruby
# ------------------------------------------------------------------------
dir = ENV['PWD'].gsub(ENV['HOME'], '~').split('/')
pwd = dir.each.with_index.inject('') do |d,(el,i)|
c = (i == (dir.count - 1)) ? el : el[0]
d << c.to_s + '/'
end.byteslice(0..-2)
print pwd
/**
* The preload script needs to stay in regular ole JavaScript, because it is
* the point of entry for electron-compile.
*/
const preloadStartTime = process.hrtime();
const { init } = require('electron-compile');
const { assignIn } = require('lodash');
const path = require('path');
/**
* The preload script needs to stay in regular ole JavaScript, because it is
* the point of entry for electron-compile.
*/
const preloadStartTime = process.hrtime();
require('../stat-cache');
const { init } = require('electron-compile');
const { assignIn } = require('lodash');
@dphase
dphase / postgres_queries_and_commands.sql
Created September 25, 2017 20:42 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
import _ from 'lodash'
import alt from '../alt'
import MessageActions from '../actions/Messages'
import SocketActions from '../actions/Socket'
class MessageStore {
constructor() {
this.messages = []
this.bindListeners({
class ImagesScreen < PM::CollectionScreen
collection_layout UICollectionViewFlowLayout
collection_cell ImagesCell
cell_identifier 'images_cell'
cell_width 78.5
cell_height 78.5
title 'Images'
attr_accessor :board, :thread