New Kbd | Old Kbd | |
---|---|---|
Small | X230/X230t | X220/X220t |
Large | T430/T430s | T420/T420s |
Station | W530 | W520/W510 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
gcc -Wall -o foo main.c test.S |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from distutils.core import setup | |
from setuptools.command.install import install | |
script = """#!/bin/sh | |
# A word about this shell script: | |
# | |
# It must work everywhere, including on systems that lack | |
# a /bin/bash, map 'sh' to ksh, ksh97, bash, ash, or zsh, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from colorsys import hsv_to_rgb | |
from time import sleep | |
from itertools import cycle | |
for i in cycle(range(100)): | |
print('\033]12;#{:02x}{:02x}{:02x}\007'.format(*map(lambda x: int(x*255), hsv_to_rgb(i/100, 1, 1))), end='', flush=True) | |
sleep(0.05) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import time | |
import sys | |
from datetime import datetime | |
import feedparser | |
import requests | |
import json | |
import sqlite3 | |
import ast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: %rehashx | |
In [2]: import praw | |
In [3]: urls = [e.url.replace('https', 'http') for e in praw.Reddit('ipython').get_subreddit('indie_rock').get_hot(limit=30) if 'youtu' in e.url or 'soundcloud' in e.url] | |
In [4]: for url in urls: | |
!mpv --no-video "$url" | |
....: | |
Playing: http://www.youtube.com/watch?v=sXfLPNv-Axs | |
[quvi] Checking URL... | |
[stream] Video --vid=1 (vp8) | |
[stream] Audio (+) --aid=1 (*) (vorbis) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
import bs4 | |
import requests | |
def log(*args): | |
print(time.strftime('\x1B[93m[%m-%d %H:%M:%S]\x1B[0m'), *args+('\x1B[0m',)) | |
def logon(res): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
newton~ <3 ipython3 | |
Python 3.4.1 (default, May 19 2014, 17:23:49) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 2.1.0 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object', use 'object??' for extra details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import * | |
import threading | |
import os | |
import asyncio | |
# vim: ts=4 sw=4 | |
backend = CDLL('libmpv.so') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following command will give you a list of BBC streams that can be accessed from anywhere since BBC only does their geoIP filtering on access of the stream *playlist*, not on access of the stream itself. | |
curl -sx http://[INSERT UK HTTP PROXY HERE]/ 'http://www.bbc.co.uk/radio/listen/live/r3_aaclca.pls'|egrep -o 'http://.*$' | |
# Low-bitrate international stream URLs look like this: | |
# http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio3_q?foobarbaz | |
# Notice the "intl" there. | |
# High-bitrate domestic stream URLs look like this: | |
# http://bbcmedia.ic.llnwd.net/stream/bbcmedia_lc1_radio3_p?foobarbaz | |
# Notice the lack of "intl" there. |
OlderNewer