Skip to content

Instantly share code, notes, and snippets.

View claytron's full-sized avatar
😎
My future is so bright.

Clayton Parker claytron

😎
My future is so bright.
View GitHub Profile
@KonnorRogers
KonnorRogers / environment.js
Last active October 3, 2022 17:25
ESBuild with Webpacker < 6 in Rails. Bye Babel <3
// DONT FORGET TO `yarn add esbuild-loader` !!!
// config/webpacker/environment.js
const { environment } = require('@rails/webpacker')
const { ESBuildPlugin } = require('esbuild-loader')
const esBuildUse = [
{
loader: require.resolve('esbuild-loader'),
// What you want to compile to, in this case, ES7
@renatorib
renatorib / operator_with_ligatures.md
Last active January 11, 2024 06:45
Using Operator Mono with Fira Code ligatures in Atom.

Using Operator Mono with Fira Code ligatures in Atom.

  1. Open your Atom's Stylesheet
    image

  2. Put this css

atom-text-editor {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
@matthojo
matthojo / Base16 Tomorrow Night Slack Theme
Last active July 28, 2016 21:54
Base16 Tomorrow Night Slack Theme
#191A1C,#282A2E,#B6BC68,#FFFFFF,#363B41,#959896,#80A2BE,#C26161
@mgreensmith
mgreensmith / Slack_solarized_themes
Last active May 2, 2024 18:14
Solarized themes for Slack
Solarized
#FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F
Solarized Dark
#073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F
@jjb
jjb / gist:6928376
Last active May 6, 2022 20:33
Installing ruby on MacOS with rbenv / ruby-build using readline from macports
sudo port -v selfupdate
sudo port install rbenv
sudo port install ruby-build
sudo port install readline
RUBY_CONFIGURE_OPTS="--with-readline-dir=/opt/local" rbenv install 2.7.1
# this gist previously also specified the openssl dir,
# but these days ruby-build downloads and builds its own openssl for you
# --with-openssl-dir=/opt/local
@davisagli
davisagli / gist:5824662
Last active April 24, 2022 11:19
Running Zope code as a celery task
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager
from Testing.makerequest import makerequest
from ZODB.POSException import ConflictError
from celery import Celery, Task
from email.Header import Header
from zope.app.publication.interfaces import BeforeTraverseEvent
from zope.component.hooks import setSite
from zope.event import notify
import email
@impressiver
impressiver / raven-config.html
Last active February 27, 2024 14:27
Raven.js configuration for logging JavaScript exceptions to Sentry (https://getsentry.com/). Without the added ignore options, you'll quickly find yourself swamped with unactionable exceptions due to shoddy browser plugins and 3rd party script errors.
<!-- Raven.js Config -->
<script src="{{ JS_PATH }}/lib/raven.js" type="text/javascript"></script>
<script type="text/javascript">
// Ignore list based off: https://gist.github.com/1878283
var ravenOptions = {
// Will cause a deprecation warning, but the demise of `ignoreErrors` is still under discussion.
// See: https://github.com/getsentry/raven-js/issues/73
ignoreErrors: [
// Random plugins/extensions
'top.GLOBALS',
@westonruter
westonruter / README.md
Last active November 10, 2023 22:24
Google Apps Script for Gmail to automatically forward Google Now notes to self onto Remember the Milk

Google Apps Script for Gmail to automatically forward Google Now notes to self onto Remember The Milk, transforming the transcribed speech into Smart Add syntax, and then archiving the thread in Gmail. Create a new script in Google Drive for Gmail, paste this JS into it, customize the rtm_email variable to your own, and customize the transformations to rtm_task for Smart Add to fit your style, and then set up a trigger to invoke the function every minute. Within approximately a minute after sending yourself a note via Google Now, the reminder will be added to your RTM account!

Example dictation: Note to self to look up article about widgets for work priority 1
Smart Add transformation: Look up article about widgets #work !1

Resources

@claytron
claytron / retro-clock.sh
Created November 28, 2012 15:45
Sweet retro clock
#!/bin/sh
while true
do
sleep 5
clear
figlet -w 200 -f smslant `date +"%H : %M"`
done
function! MyFoldText() " {{{
let line = getline(v:foldstart)
let nucolwidth = &fdc + &number * &numberwidth
let windowwidth = winwidth(0) - nucolwidth - 3
let foldedlinecount = v:foldend - v:foldstart
" expand tabs into spaces
let onetab = strpart(' ', 0, &tabstop)
let line = substitute(line, '\t', onetab, 'g')