Skip to content

Instantly share code, notes, and snippets.

View nmanske's full-sized avatar
👨‍💻

Nathan Manske nmanske

👨‍💻
View GitHub Profile
@linstantnoodles
linstantnoodles / ebert_amazon.py
Last active July 5, 2020 19:31
Get amazon prime information on Roger Ebert Great Movies
import requests
import csv
import os
import json
import re
from bs4 import BeautifulSoup
import mechanize
from random import choice
user_agents = ['Mozilla/5.0 (X11; U; Linux; i686; en-US; rv:1.6) Gecko Debian/1.6-7','Konqueror/3.0-rc4; (Konqueror/3.0-rc4; i686 Linux;;datecode)','Opera/9.52 (X11; Linux i686; U; en)']
random_user_agent = choice(user_agents)
@devpruthvi
devpruthvi / clone-all-gists.py
Created July 31, 2016 15:15
Gist to download all public and private gists
#!/usr/bin/python
#Depends on: https://github.com/defunkt/gist and git
#install them first
#then run python clone-all-gists.py
import subprocess,re
gists = subprocess.check_output(['gist','-l'])
gists = re.findall('^.*com\/(.*?)(?:\s|$)',gists,re.M)
for gist in gists:
url = 'https://gist.github.com/%s.git' % gist
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active March 6, 2023 00:10
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@pklaus
pklaus / remove-orphaned-raw-images.py
Last active May 8, 2023 20:43
Do you own a DSLR? If so, do you transfer your images to your computer, then look at the JPEGs and delete the crappy ones? If you do, your RAW images may be leftover. This Python script helps you cleaning up your image folders after deleting unwanted JPEGs. See http://blog.philippklaus.de/2012/12/cleaning-leftover-raw-images-after-selecting-imag…
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""
This script was moved to
https://github.com/pklaus/pklaus/blob/master/pklaus/images/orphans/remove.py
Here's the original content left for you as a reference:
Do you own a DSLR? If so, do you transfer your images to your computer,
then look at the JPEGs and delete the crappy ones? If you do, your RAW
@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


@ksafranski
ksafranski / expecting.md
Last active November 11, 2023 23:00
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect
@ericandrewlewis
ericandrewlewis / index.md
Last active November 24, 2023 14:07
C++ Pointer Tutorial

C++ Pointer Tutorial

Because pointers can be ugh

"Regular" variables (not pointers)

To understand a pointer, let's review "regular" variables first. If you're familiar with a programming language without pointers like JavaScript, this is what you think when you hear "variable".

When declaring a variable by identifier (or name), the variable is synonymous with its value.

@sleepyfox
sleepyfox / 2019-07-25-users-hate-change.md
Last active December 10, 2023 18:20
'Users hate change'

'Users hate change'

This week NN Group released a video by Jakob Nielsen in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:

  1. Humans naturally resist change
  2. Your change is for the better
  3. Customers should just get used to it and stop complaining

There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.

@selimslab
selimslab / get_gists.py
Last active December 23, 2023 15:52 — forked from leoloobeek/get_gists.py
Download all gists of a user
import sys
from subprocess import call
import json
import os
import requests
def download_gists(gists: list):
for gist in gists:
call(["git", "clone", gist["git_pull_url"]])
@rtimmons
rtimmons / slides.md
Created June 21, 2018 18:11
Learning C++ The Hard Way

Welcome

Who is this guy?

Goal(s)

  1. Don't WTF quite so much when looking at C++ PRs
  2. Know what you don't know (so you know what to look up to learn more)

Agenda