Skip to content

Instantly share code, notes, and snippets.

View jovincroninwilesmith's full-sized avatar

Jovin Cronin-Wilesmith jovincroninwilesmith

View GitHub Profile
@benjamincharity
benjamincharity / autonomous.txt
Last active April 12, 2024 22:20
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
@sstern6
sstern6 / gist:11f4e3ff92e0bc4052b1
Last active February 5, 2018 12:53
How To | Implement Intercom with React JS 0.14
Disclaimer : I was using Webpack with React/Flux, this is just an implementation that I got to work. Many other ways you could do this.
-Reference Intercom for more information on implementation: https://docs.intercom.io/install-on-your-web-product/integrating-intercom-in-one-page-app
Step 1) create 2 files in your apps root, chat.js and intercom.js.
Step 2) In chat.js paste in the JS library file given to you in the docs, but replace {app_id} with your actually app_id:
(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;
s.src='https://widget.intercom.io/widget/{app_id}';
var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,fa
@ottomata
ottomata / schema.py
Last active February 21, 2018 22:26
eventlogging avro code WIP
# for validation avro records
import pyavroc
# pyavroc>=0.7.1
# ---- AVRO stuff, to do more of this ---
SCHEMA_AVRO_FILE_PATH = './schemas/avro'
SCHEMA_AVRO_FILE_FORMAT = (
@iconara
iconara / queries.sql
Last active November 13, 2023 22:26
Low level Redshift cheat sheet
-- Table information like sortkeys, unsorted percentage
-- see http://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html
SELECT * FROM svv_table_info;
-- Table sizes in GB
SELECT t.name, COUNT(tbl) / 1000.0 AS gb
FROM (
SELECT DISTINCT datname, id, name
FROM stv_tbl_perm
JOIN pg_database ON pg_database.oid = db_id
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@pksunkara
pksunkara / config
Last active April 20, 2024 04:50
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta