This file contains hidden or 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
| >>> f = open('c:\\users\\ohnob\\appdata\\local\\temp\\f.txt', 'w') | |
| >>> with f as fi: | |
| ... fi.write('hi') | |
| ... | |
| 2 | |
| >>> f.write('there') | |
| Traceback (most recent call last): | |
| File "<stdin>", line 1, in <module> | |
| ValueError: I/O operation on closed file. |
This file contains hidden or 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
| @getattr(''' 2>NUL | |
| @ECHO OFF | |
| : # Ignore any ERRORLEVEL infection attempt | |
| SET ERRORLEVEL= | |
| hg --config extensions.runcmd=%0\..\hgpy.cmd -- %* | |
| EXIT /B %ERRORLEVEL% | |
| ''', 'format') | |
| def n(): | |
| pass |
This file contains hidden or 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
| ohnobinki@gibby ~/MusclePharm $ busybox telnet sam.ohnopub.net 10005 | |
| HTTP/1.0 200 Ok | |
| Content-Type: text/plain | |
| Readme: Hello there | |
| Hello! Welcome to this server! | |
| Type 'quit' to terminate it. Type an empty line to drop this connection. | |
| Type something other to display it on exit. | |
| other |
This file contains hidden or 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
| Return-Path: <jsmith@ohnopublishing.net> | |
| X-Original-To: ohnobinki@ohnopublishing.net | |
| Delivered-To: ohnobinki@ohnopublishing.net | |
| Received: by ohnopublishing.net (Postfix, from userid 1017) | |
| id 8AD22B7AAC; Mon, 5 Oct 2015 22:06:40 +0000 (UTC) | |
| DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ohnopublishing.net; | |
| s=ohnopublishing; t=1444082800; | |
| bh=T8tiW+eBSVtcylt4kR1D1AdHP48z83nE08oeuBjj3ak=; | |
| h=Date:From:To:Subject:References:In-Reply-To; | |
| b=h6qbIEv5isIqnMGraVXDTFviA8dMqWvjKUYHoNoWFDK6rrh2rsDphsasyQiF40S0+ |
This file contains hidden or 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
| Return-Path: <jsmith@ohnopublishing.net> | |
| X-Original-To: ohnobinki@ohnopublishing.net | |
| Delivered-To: ohnobinki@ohnopublishing.net | |
| Received: from [192.168.1.127] (c-68-48-94-14.hsd1.mi.comcast.net [68.48.94.14]) | |
| (Authenticated sender: jsmith) | |
| by ohnopublishing.net (Postfix) with ESMTPSA id A9FD69E505 | |
| for <ohnobinki@ohnopublishing.net>; Mon, 5 Oct 2015 22:11:52 +0000 (UTC) | |
| DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ohnopublishing.net; | |
| s=ohnopublishing; t=1444083113; | |
| bh=geyN2d7+66FqM0DcZfmaDgk0rnjyz8hxv8u7byUd+Ok=; |
This file contains hidden or 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
| Return-Path: <jsmith@ohnopublishing.net> | |
| X-Original-To: ohnobinki@ohnopublishing.net | |
| Delivered-To: ohnobinki@ohnopublishing.net | |
| Received: from WINF5A6PNAUAJ2 (c-68-48-94-14.hsd1.mi.comcast.net [68.48.94.14]) | |
| (Authenticated sender: jsmith) | |
| by ohnopublishing.net (Postfix) with ESMTPSA id 8A48B9E505 | |
| for <ohnobinki@ohnopublishing.net>; Mon, 5 Oct 2015 22:02:52 +0000 (UTC) | |
| DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ohnopublishing.net; | |
| s=ohnopublishing; t=1444082574; | |
| bh=UV+KCasCyJRcs9NObvKzNKy4cEGfsgOKPS/G1E0RlQo=; |
This file contains hidden or 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 math | |
| size = int(input('Enter the desired size of your table>')) | |
| justwidth = 1 + int(math.log10(size*size)) | |
| for y in range(1, size+1): | |
| print(' '.join([str(x*y).rjust(justwidth) for x in range(1, size + 1)])) |
This file contains hidden or 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
| #include <stdio.h> | |
| /* | |
| * GCC spits out warnings that I think it shouldn’t as the standard | |
| * says that “None of the expressions from any other generic | |
| * association of the generic selection is evaluated.” (9899:2011 | |
| * 6.5.1.1) | |
| */ | |
| /* #define p(x) _Generic(x, long: printf("%ld\n", x), int: printf("%d\n", x), const char *: printf("%s\n", x), char *: printf("%s\n", x))*/ | |
| /* |
This file contains hidden or 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
| #!/bin/bash | |
| for f in "${HOME}/OneDrive/IFTTT/iOS Photos/workreceipts/"*; do | |
| if [ -e "${f}" ]; then | |
| dspec=$(echo "${f##*/}" | sed -e 's/_/ /g' -e 's/\.[^.]*$//' -e 's/ at / /' -e 's/\([0-9][0-9]\)\([0-9]*[AP]M\)/\1:\2/') | |
| # lol. Windows doesn’t allow colons in filenames. Guess why. | |
| erf="${HOME}/Documents/SugarSync Shared Folders/Nathan Brink/expense_reports/$(date +%Y-%m --date "${dspec}")/$(date -Iseconds --date "${dspec}" | sed -e s/:/./g).${f##*.}" | |
| mkdir -p "${erf%/*}" | |
| mv "${f}" "${erf}" | |
| else | |
| true |