Skip to content

Instantly share code, notes, and snippets.

View gyaresu's full-sized avatar

Gareth gyaresu

View GitHub Profile
@jasonclark
jasonclark / booklist.js
Last active May 4, 2020 00:11
booklist javascript (jQuery) - calling google spreadsheet api, parsing response
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
//source Google Sheets file is https://docs.google.com/spreadsheets/d/1rX4_fInsYS7vOGpnXm1UklZgvU27FXl3UYu9lx9RHHU/
$(function listBooks() {
$.getJSON( "https://spreadsheets.google.com/feeds/list/1rX4_fInsYS7vOGpnXm1UklZgvU27FXl3UYu9lx9RHHU/1/public/full?alt=json",
function (data) {
$('div#book-list').append('<ul class="items"></ul>');
$.each(data.feed.entry, function(i,entry) {
var item = '<span style="display:none">' + entry.id.$t + '</span>';
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@lokkju
lokkju / find_system_python_dylibs.sh
Last active December 31, 2023 23:08
This script prints the filenames of any libs in your /usr/local/lib that depend on the System Python. It is especially useful if you use a non-system Python, but have previously compiled extensions against the System Python - it will tell you which need to be recompiled.
#!/bin/bash
echo "This script prints the filenames of any dylibs in your /usr/local/ that depend on the System Python"
for f in `find /usr/local/lib`; do
otool -L "$f" 2> /dev/null| grep Python | grep System &> /dev/null
status=$?
if [ $status -eq 0 ]; then
echo "$status: $f"
fi
done
use warnings;
use Getopt::Std;
getopt('xytGgwsf',\%opts);
# pcm file = $opts{f}
# samples per pixel x
$xscale = $opts{x} // 1200;
@trinitronx
trinitronx / truecrypt_fix.bash
Last active April 27, 2023 15:45 — forked from jimjh/truecrypt_fix.bash
Fixes annoying brew doctor messages caused by Truecrypt
#!/bin/bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/libosxfuse_i32.la" \
"/usr/local/lib/libosxfuse_i64.la" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
@juliepagano
juliepagano / 101_off_limits.md
Last active December 16, 2020 09:37
101 conversations I generally don't want to have...

This list now exists over at http://juliepagano.com/blog/2013/11/02/101-off-limits/ and will be updated there.

I keep saying that impromptu, unwanted feminism 101 discussions are exhausting and not a good use of my resources. Then people ask what I mean by 101, so I'm starting to make a list. This list will change over time - I recommend checking back.

I highly recommend checking this list before engaging with me about feminism if you're new to it. It'll save both of us a lot of time and frustration.

Diversity in tech

Women aren't equally represented in tech because biology

Nope. This argument is bad and the science does not support it. Unfortunately, every time you say this out loud, you are contributing to cultural problems that do decrease the number of women in tech.

@chrislkeller
chrislkeller / import_json_appsscript.js
Last active March 25, 2024 19:45
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@csete
csete / ais_rx.grc
Created September 11, 2013 14:45
2 channel AIS receiver prototyped in GNU Radio Companion (version 3.7.1)
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
<timestamp>Wed Sep 11 16:13:12 2013</timestamp>
<block>
<key>variable</key>
<param>
<key>id</key>
<value>xlate_filter_taps</value>
</param>
<param>
@dpslwk
dpslwk / i2c_24lc256.py
Last active August 12, 2019 09:14
B025 - RTC/EEPROM/TMP Example For the 24LC256 EEPROM http://docs.ciseco.co.uk/RET
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" B025 - RTC/EEPROM/TMP Example For the 24LC256 EEPROM
Copyright (c) 2013 Ciseco Ltd.
Author: Matt Lloyd
Requires wiringpi2-python for i2c interface
This code is distributed in the hope that it will be useful,