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
Copyright (c) 2012 Xidorn Quan | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in |
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
all: mov xor | |
mov: mov.o | |
ld -o mov mov.o | |
xor: xor.o | |
ld -o xor xor.o | |
mov.o: mov.asm | |
yasm -f macho64 -o mov.o mov.asm |
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
/* | |
* Copyright (C) 2012 Xidorn Quan <[email protected]> | |
* | |
* This file is part of MPlayer. | |
* | |
* MPlayer is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* |
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 | |
cat /proc/cpuinfo | grep processor | wc -l |
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/zsh | |
INITIAL_SIZE=5 | |
VOLUME_NAME='ramdisk' | |
MOUNTPOINT='/tmp/upsuper' | |
MOUNTPOINT_FILE='/tmp/ramdisk.mountpoint' | |
# find a non-existent initial mount point | |
mountpoint=$(mktemp -dt ramdisk) | |
# set ramdisk size |
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
diff -ur a/CPP/7zip/Archive/Zip/ZipItem.cpp b/CPP/7zip/Archive/Zip/ZipItem.cpp | |
--- a/CPP/7zip/Archive/Zip/ZipItem.cpp 2016-02-02 03:50:10.000000000 +1100 | |
+++ b/CPP/7zip/Archive/Zip/ZipItem.cpp 2023-08-15 23:19:44.862769098 +1000 | |
@@ -1,6 +1,7 @@ | |
// Archive/ZipItem.cpp | |
#include "StdAfx.h" | |
+#include <iconv.h> | |
#include "../../../../C/CpuArch.h" |
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
class FileInfo | |
def initialize(name, data) | |
@name = name | |
@length = data.length | |
@space = data.each_char.inject(0) { |n, c| | |
n += case c | |
when '\t' then 8 | |
when /\s/ then 1 | |
else 0 | |
end |
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
# coding: UTF-8 | |
import socket | |
import struct | |
def aton(addr): | |
return struct.unpack('!l', socket.inet_aton(addr)) | |
def ntoa(addr): | |
return socket.inet_ntoa(struct.pack('!l', addr)) |
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 ruby | |
require 'optparse' | |
require 'net/http' | |
CATEGORIES = [:anime, :book, :music, :game, :real] | |
STATES = [:wish, :collect, :do, :on_hold, :dropped] | |
progress = true | |
options = { |
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/python | |
# - * - coding: UTF-8 - * - | |
from sys import stdout | |
from time import sleep | |
from itertools import cycle | |
MOON = [u'\U0001F311', u'\U0001F312', u'\U0001F313', u'\U0001F314', | |
u'\U0001F315', u'\U0001F316', u'\U0001F317', u'\U0001F318'] |