Skip to content

Instantly share code, notes, and snippets.

🌞
I may be slow to respond.

Nicholas Bennett tothebeat

🌞
I may be slow to respond.
Block or report user

Report or block tothebeat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tothebeat
tothebeat / r-rstudio-tinytex-faq.markdown
Last active Jan 8, 2019
FAQs related to installing R, RStudio, TinyTeX at Kellogg
View r-rstudio-tinytex-faq.markdown

FAQs for Installing R, RStudio, and TinyTeX

@ Kellogg School of Management

1. /usr/local/bin not writable

I see this error when I install TinyTeX:

add_link_dir_dir: destination /usr/local/bin not writable, no links from /Users/hagen/Library/TinyTeX/bin/x86_64-darwin. add of symlinks had 1 error(s), see messages above. add of symlinks had 1 error(s), see messages above. tlmgr: An error has occurred. See above messages. Exiting.

This is an issue on some Macs, where that folder /usr/local/bin is not writable by your user account for some reason. Here's how to fix it:

@tothebeat
tothebeat / beer_menu.thor
Created Jan 27, 2018 — forked from cadwallion/beer_menu.thor
Ruck beer list scraper
View beer_menu.thor
#!/usr/bin/env ruby
# A Thor-based commandline tool for all BeerMenu.
# Based on @jsteiner's Ruby equivalent of @jlet's Python Ruck
# beer list scraper
# @jsteiner's Original: https://gist.github.com/2703889
# @jlet's Original: ttps://gist.github.com/2659721
require 'open-uri'
require 'nokogiri'
@tothebeat
tothebeat / ruck-beer.py
Created Jan 27, 2018 — forked from jletourneau/ruck-beer.py
Ruck beer list scraper
View ruck-beer.py
#!/usr/bin/python
from pyquery import PyQuery as pq
import re
import datetime
print datetime.datetime.now().strftime('%c')
print
doc = pq(url='http://www.beermenus.com/places/4733-the-ruck')
@tothebeat
tothebeat / fabfile.py
Last active Jan 9, 2018 — forked from roselleebarle04/fabfile.py
Simple django fabric script for deployment
View fabfile.py
import os
import sys
from fab_deploy import *
from fabric.contrib.console import confirm
from fabric.api import env, cd, prefix, local, sudo as _sudo, run as _run, hide, task, settings, abort
from fabric.contrib.files import exists, upload_template
from fabric.colors import yellow, green, blue, red
from fabric.operations import _prefix_commands, _prefix_env_vars
from contextlib import contextmanager
@tothebeat
tothebeat / gist:92e7950a27b2b96b52830fa54c09e9c8
Created Nov 28, 2017 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:92e7950a27b2b96b52830fa54c09e9c8

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@tothebeat
tothebeat / convert.py
Last active May 16, 2017 — forked from paulgb/convert.py
Convert the Yelp Academic dataset from JSON to CSV files with Pandas.
View convert.py
'''
Convert Yelp Academic Dataset from JSON to CSV
Requires Pandas (https://pypi.python.org/pypi/pandas)
By Paul Butler, No Rights Reserved
'''
import json
import pandas as pd
View sudoku.py
#!/usr/bin/python
from __future__ import print_function
from pprint import pprint
# Write a function done_or_not passing a board (list[list_lines]) as parameter.
# If the board is valid return 'Finished!', otherwise return 'Try again!'
# Sudoku rules:
#
# ROWS:
View face_detect.py
import sys, cv2
# Refactored https://realpython.com/blog/python/face-recognition-with-python/
def cascade_detect(cascade, image):
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
return cascade.detectMultiScale(
gray_image,
scaleFactor = 1.15,
minNeighbors = 5,
View curl-with-sftp.sh
#!/bin/sh
# copied from http://zeroset.mnim.org/2013/03/14/sftp-support-for-curl-in-ubuntu-12-10-quantal-quetzal-and-later/
mkdir /tmp/curl
cd /tmp/curl
sudo apt-get update
sudo apt-get install build-essential debhelper libssh2-1-dev
apt-get source curl
sudo apt-get build-dep curl
cd curl-*
dpkg-buildpackage
@tothebeat
tothebeat / Makefile
Last active Nov 28, 2018
Periodic Screenshots (every 10 seconds) on Mac OS X
View Makefile
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " screencap To start recording screencaps and clean up yesterday's captures."
@echo " cleanyesterday Just delete yesterday's captures."
@echo " captoday Just start recording screencaps for today."
screencap:
./remove_yesterday_recording.sh
./start_recording.sh
You can’t perform that action at this time.