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
-- USAGE: create an Automator service that receives selected text and put this in "Run AppleScript" | |
on run {input, parameters} | |
choose from list {"Alex", "Daniel", "Ewa", "Samantha", "Serena", "Thomas", "Zosia", "Bad News", "Good News", "Pipe Organ"} with prompt "Choose voice:" without multiple selections allowed and empty selection allowed | |
set voice to the result as string | |
say input using voice | |
return input | |
end run |
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 python3 | |
from __future__ import print_function | |
def f(n, level=0): | |
indent = level * ' ' | |
print(indent, 'start', n) | |
if n == 10202: | |
print(indent, 'return constant from', n) | |
return 4 |
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
--- for.s 2016-12-08 20:00:37.121281039 +0100 | |
+++ while.s 2016-12-08 20:00:38.705280904 +0100 | |
@@ -1,4 +1,4 @@ | |
- .file "for.c" | |
+ .file "while.c" | |
.intel_syntax noprefix | |
.text | |
.globl main |
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
from functools import wraps | |
def dec(f): | |
@wraps(f) | |
def wrapper(i): | |
print("wrapper") | |
return f(i) | |
return wrapper |
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
floppy.bin: kernel.c stage1.asm stage2.asm | |
gcc kernel.c -std=c99 -nostdlib -o kernel64 | |
strip kernel64 | |
nasm stage1.asm | |
nasm stage2.asm | |
dd if=/dev/zero bs=1 count=$((512-$(stat --printf="%s" stage1))) >> stage1 | |
cat stage1 stage2 kernel64 > floppy.bin | |
bash -c 'fsize=$$(stat --printf="%s" floppy.bin); if [[ $$(($$fsize%512)) != 0 ]]; then dd if=/dev/zero bs=1 count=$$((512-($$fsize%512))) >> floppy.bin; fi' |
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
<?php | |
/* | |
Plugin Name: Meta2 Widget | |
Description: Meta2 Widget. | |
*/ | |
class WP_Widget_Meta2 extends WP_Widget { | |
/** | |
* Sets up a new Meta widget instance. | |
* |
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
[user] | |
name = Chris Warrick | |
email = [email protected] | |
username = Kwpolska | |
[color] | |
ui = 1 | |
diff = auto | |
status = auto | |
branch = auto | |
[github] |
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 python3 | |
from enum import Enum | |
from queue import Queue, Empty | |
class Action(Enum): | |
addMessage = 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
N. <raw format="html" xml:space="preserve"><pre class="code bash"><a name="rest_code_d86c70c19454410b923d46ffb81e8c5f-1"></a>sudo vim /etc/lightdm/lightdm-gtk-greeter.conf | |
</pre></raw> | |
N. <raw format="html" xml:space="preserve"><pre class="code ini"><a name="rest_code_485b10953d80423e9d1e89fb6aae9041-1"></a><span class="k">[base]</span> | |
<a name="rest_code_485b10953d80423e9d1e89fb6aae9041-2"></a><span class="na">session</span><span class="o">=</span><span class="s">/usr/bin/startlxde</span> | |
<a name="rest_code_485b10953d80423e9d1e89fb6aae9041-3"></a><span class="err">...</span> | |
<a name="rest_code_485b10953d80423e9d1e89fb6aae9041-4"></a><span class="k">[userlist]</span> | |
<a name="rest_code_485b10953d80423e9d1e89fb6aae9041-5"></a><span class="na">disable</span><span class="o">=</span><span class="s">1</span> | |
</pre></raw> | |
N. <raw format="html" xml:space="preserve"><pre class="code python"><a name="rest_code_3c1e76e33f5947f39f83e81945e24503-1"></a><span class="n">foo</span> | |
<a name="rest_code_3c1e76e33f5947f39f83e81 |
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 python3 | |
from datetime import * | |
print(datetime.now() + timedelta(100), end=' (local time)\n') |