import struct
def dumpx(x): return (''.join(map(lambda x: '\\x%02x'%x, struct.pack('<Q', x))))
def d(x): print ('print "%s";' % dumpx(x))
- remove all packages except core ones which are dangerous to remove
- iterate over .list files, build list of all files to be removed
- filter out some critical from those
- remove all files and empty directories which are in that list from disk, pop them from that list on removal
- keep doing previous step until list is empty, or there are no empty directories left in it
- print out list leftovers and ask user to handle them manually
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 PIL import Image | |
import struct | |
# https://msdn.microsoft.com/en-us/library/windows/desktop/dd390989(v=vs.85).aspx | |
red_mask = 0xF800; | |
green_mask = 0x7E0; | |
blue_mask = 0x1F; | |
def rgb565pixunpack(pixel): | |
r = (pixel & red_mask) >> 11; |
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
set scnds to (time of (current date)) | |
set timeOfDay to item ((scnds div 21600 as integer) + 1) of {"night", "morning", "afternoon", "evening"} | |
set userName to (item 1 of (words of (long user name of (system info)))) | |
say "Good " & timeOfDay & ", " & userName & "." using "Alex" speaking rate 170 modulation 70 pitch 39 |
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
// File: | |
// click.m | |
// | |
// stek29 2015 | |
// | |
// Compile with: | |
// cc -o click click.m -framework ApplicationServices -framework Foundation | |
// | |
// Usage: | |
// ./click x_cord y_cord |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type Fetcher interface { | |
// Fetch returns the body of URL and | |
// a slice of URLs found on that page. |
public domain but no liability blah blah
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
import telethon.sync | |
from telethon.tl.types import WallPaper | |
from telethon.tl.functions.account import GetWallPapersRequest | |
# see telethon docs to get client | |
w = client(GetWallPapersRequest()) | |
for i, wp in enumerate(w): |
"non-cheat" quantum computing bot (makes decisions based on chip opacity, without accessing game's internal variables)
Add "toggle" button to quantum computing