Skip to content

Instantly share code, notes, and snippets.

@minniel
minniel / slack_history.py
Last active February 28, 2022 22:02 — forked from Chandler/slack_history.py
Download Slack Channel/PrivateChannel/DirectMessage History
from slacker import Slacker
import json
import argparse
import os
import shutil
import copy
from datetime import datetime
# This script finds all channels, private channels and direct messages
# that your user participates in, downloads the complete history for
@brandondurham
brandondurham / styles.less
Last active June 24, 2024 14:48
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):
@Chandler
Chandler / slack_history.py
Last active March 26, 2024 14:35
Download Slack Channel/PrivateChannel/DirectMessage History
print("UPDATE AUG 2023: this script is beyond old and broken")
print("You may find interesting and more up to date resources in the comments of the gist")
exit()
from slacker import Slacker
import json
import argparse
import os
# This script finds all channels, private channels and direct messages
@chockenberry
chockenberry / Hosts.txt
Created January 22, 2015 17:58
Host headers from China
1.gravatar.com
127.0.0.1:9010
2003---el-oro-de-moscu-xvid-avi.foldforper7.appspot.com
a.tracker.thepiratebay.org
a2.l3-images.myspacecdn.com
a248.e.akamai.net
acyd-karpathicus.deviantart.com
ads.exoclick.com
agentoftrickery.deviantart.com
airinya.deviantart.com
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@siracusa
siracusa / rename.pl
Created August 16, 2014 16:29
Larry Wall's file renamer, slightly modified
#!/usr/bin/perl
use strict;
use warnings;
die "Usage: rename <expression> <files>\n" unless (@ARGV >= 2);
my $op = eval 'sub { ' . shift . ' }'; # crazily dangerous - type carefully!
die $@ if $@;
@benjamintanweihao
benjamintanweihao / run_length_encoder.ex
Last active August 1, 2016 20:09
Elixir Quiz #2: Run Length Encoding
# Given a string of uppercase characters in the range A-Z,
# replace runs of sequential characters with a single
# instance of that value preceded by the number of items
# in the run.
defmodule RunLengthEncoder do
def encode(string) do
encode_aux(String.codepoints(string), [])
end
# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end
@BluntBlade
BluntBlade / crc32 in bash
Last active December 2, 2020 01:55
A Bash version of CRC32
#!/bin/bash
##############################################################################
#
# Easy Qiniu Bash SDK
#
# www.qiniu.com
#
# Module: utils/crc32.sh
#
server {
listen 443;
server_name example.com;
client_max_body_size 0;
chunkin on;
ssl on;
ssl_certificate /path/to/crt;
ssl_certificate_key /path/to/key;