Skip to content

Instantly share code, notes, and snippets.

View dsample's full-sized avatar

Duncan Sample dsample

View GitHub Profile
@nightscape
nightscape / zmv-examples.md
Last active February 28, 2023 20:39 — forked from niksmac/zmv-examples.md
ZMV-Examples (require autoload zmv)

rename a section of a filename, i. e. example.1.{txt,conf,db} or 12345.1.{wav,ogg,mp3} and change the 1 to a 2 in the filename while preserving the rest of it.

  zmv -n '(*.)(<->)(.[^.]#)' '$1$(($2+1))$3' # would rename x.0001.y to x.2.y.
  zmv -n '(*.0#)(<->)(.[^.]#)' '$1$(($2+1))$3'

Rename files to lower case

  $ zmv '*' '${(L)f}'
@dedy-purwanto
dedy-purwanto / download_class_dojo_archive.py
Created April 11, 2020 17:08
Download all photos and videos from your Class Dojo account
"""
Download all ClassDojo photos and videos in your timeline.
by kecebongsoft
How it works:
1. Fetch list of items in the timeline, if there are multiple pages, it will fetch for all pages.
2. Collect list of URLs for the attachment for each item
3. Download the files into local temporary directory, and also save the timeline activity as a json file.
@travishorn
travishorn / download-classdojo-media.md
Last active February 4, 2024 08:09
Saving the images and videos from your ClassDojo storyline

Archived

Please see Patrick330's fork of this script.

ClassDojo changes their site regularly, so a script like this needs regular maintenance. I have decided to archive this project and stop providing updates. Patrick330's fork linked above may be a good alternative.

Original Purpose

ClassDojo is a classroom communication app used to share reports between parents and teachers. Teachers track student behavior and upload photos or videos. The gamification style system teaches developmental skills through real-time feedback.

#Punch through bean info

  1. download the arduino program to write arduino code - https://www.arduino.cc/en/Main/Software

  2. download whichever bits on here you need https://punchthrough.com/bean/guides/everything-else/downloads/

  3. I had problem trying to get the serial port to read correctly, can’t remember which magical incantation i had to do, but it was on the punchthrough forums, i can go back and look if you need it.

http://beantalk.punchthrough.com/t/heres-how-to-access-bean-serial-data-in-processing/751 this may have been it, but i'm pretty sure the npm package below fixed it too, might be useful if the npm package doesn't work.

@domenic
domenic / 0-github-actions.md
Last active April 8, 2024 23:35
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@pjobson
pjobson / remove_mcafee.md
Last active March 26, 2024 04:26
OSX McAfee Removal

Removal of McAfee from OSX

Note: This was written in 2015, it may be out of date now.

There are a lot of commands here which I use sudo if you don't know what you're doing with sudo, especially where I rm you can severely screw up your system.

There are many reasons which you would want to remove a piece of software such as McAfee, such as not wanting it to hammer your CPU during work hours which seems like primetime for a virus scan.

I intend this to be a living document, I have included suggestions from peoples' replies.

@ivanoats
ivanoats / .railsrc
Last active August 11, 2020 09:33 — forked from gringocl/gist:8480696
# .railsrc
-B #Skip Bundle
-T #Skip Test-Unit
-d postgresql #Use postgres
@nbremer
nbremer / .block
Last active August 14, 2023 23:44
D3.js - Radar Chart or Spider Chart - Adjusted from radar-chart-d3
height: 650
license: mit
@smoser
smoser / gist:4756561
Last active November 8, 2023 15:20
boot a cloud image in kvm
## Install a necessary packages
$ sudo apt-get install kvm cloud-utils genisoimage
## URL to most recent cloud image of 12.04
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release"
$ img_url="${img_url}/ubuntu-12.04-server-cloudimg-amd64-disk1.img"
## download the image
$ wget $img_url -O disk.img.dist
## Create a file with some user-data in it
@selvan
selvan / oauth2-google-refresh-token
Created January 23, 2013 08:42
Geting new access token using refresh token - Google oauth2
### Method 1
gem install oauth2
require 'oauth2'
client = OAuth2::Client.new(GOOGLE_KEY, GOOGLE_SECRET, {:site => 'https://accounts.google.com', :authorize_url => "/o/oauth2/auth", :token_url => "/o/oauth2/token"})
response = OAuth2::AccessToken.from_hash(client, :refresh_token => REFRESH_TOKEN).refresh!