Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
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) |
#!/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 |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
#!/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 |
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?
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.
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
Because pointers can be ugh
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.
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:
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.
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"]]) |