Skip to content

Instantly share code, notes, and snippets.

@la32094uf
la32094uf / slack_delete.py
Last active June 9, 2017 11:09 — forked from jbq/slack_delete.py
Delete Slack files via API. Usage: python slack_delete.py --token <apiToken> [-d <olderThanDays>] [-c <maxCount>] [s <minSizeInBytes>]
import argparse
import requests
import time
import json
def main():
"""
Entry point of the application
:return: void
@dannguyen
dannguyen / wget-snapshotpage.md
Last active December 25, 2023 20:57
Use wget to snapshot a page and its necessary visual dependencies

Use wget to mirror a single page and its visible dependencies (images, styles)

Money graphic via State of Florida CFO Vendor Payment Search

Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)

This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.

@darrenboyd
darrenboyd / openssl_downgrade.md
Last active January 11, 2024 09:02
A quick guide to downgrading OpenSSL with Homebrew

OBSOLETE

THIS INFORMATION IS NOW OUT OF DATE, AND EXISTS HERE ONLY FOR ARCHIVAL PURPOSES

TROUBLESHOOTING

Excon Error

You may suffer an error that looks like this. It's possible you are setting up a new Mac, or you just recompiled your Ruby.

@jodosha
jodosha / Gemfile
Last active December 9, 2020 15:09
Full stack Lotus application example
source 'https://rubygems.org'
gem 'rake'
gem 'lotus-router'
gem 'lotus-controller'
gem 'lotus-view'
group :test do
gem 'rspec'
gem 'capybara'
@KittyGiraudel
KittyGiraudel / main.scss
Last active April 5, 2022 19:11
From: Architecturing a Sass project
// Sass utilities
@import "helpers/variables";
@import "helpers/functions";
@import "helpers/mixins";
@import "helpers/placeholders";
// Vendors and external stylesheets
@import "vendors/bootstrap";
@import "vendors/jquery-ui";
@anotheruiguy
anotheruiguy / web-fonts-asset-pipeline.md
Last active May 24, 2023 22:08
Custom Web Fonts and the Rails Asset Pipeline

Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.

Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.

As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.

The recommended way

Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.

-- This script includes examples for using AppleScript to perform several
-- useful tasks with Evernote.
-- Each section illustrates a chunk of Evernote's AppleScript interface,
-- and each section also cleans up after itself.
-- Please refer to the Evernote application's scripting dictionary for
@masonforest
masonforest / gist:4048732
Created November 9, 2012 22:28
Installing a Gem on Heroku from a Private GitHub Repo

Installing a Gem on Heroku from a Private GitHub Repo

Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.

Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.

  1. Get an OAuth Token from GitHub

First you will need to get an OAuth Token from GitHub using your own username and "note"

{
/* Modifier keys: start with C-m */
"^m" = {
"^ " = ("insertText:", "\U2423"); /* C-space space */
"^e" = ("insertText:", "\U21A9"); /* C-e return */
"e" = ("insertText:", "\U2305"); /* e enter */
"^t" = ("insertText:", "\U21E5"); /* C-t tab */
"t" = ("insertText:", "\U21E4"); /* t backtab */
@jodosha
jodosha / array.rb
Created April 9, 2011 17:27
Benchmark for Array#empty? vs Array#any?
#!/usr/bin/env ruby -w
require 'benchmark'
TIMES = 10_000_000
EMPTY_ARRAY = [ ]
FILLED_ARRAY = [ 1 ]
Benchmark.bm(30) do |b|
b.report "! Array#empty? with empty array" do