Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
In Tools | Options | Keyboard...
CTRL+W
as a Global shortcut for Window.CloseDocumentWindow
CTRL+W
shortcut for Edit.SelectCurrentWord
The caveat to this is if you are used to using CTRL+W
to select the current word. If you do, find another shortcut that works for that.
#!/bin/sh | |
# script for optimizing images in a directory (recursive) | |
# pngcrush & jpegtran settings from: | |
# http://developer.yahoo.com/performance/rules.html#opt_images | |
# pngcrush | |
for png in `find . | grep .png`; do | |
echo "crushing $png ..." | |
pngcrush -rem alla -reduce -brute "$png" temp.png |
#! /bin/bash | |
set -e | |
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG | |
trap 'echo FAILED COMMAND: $previous_command' EXIT | |
#------------------------------------------------------------------------------------------- | |
# This script will download packages for, configure, build and install a GCC cross-compiler. | |
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running. | |
# If you get an error and need to resume the script from some point in the middle, | |
# just delete/comment the preceding lines before running it again. |
-- written by Florian Bender, 2015 | |
-- based on work by Michael Wyszomierski <https://wysz.com/wyszdom/2009/06/simple-sleep-timer-with-applescript/> | |
-- license: Public Domain / CC0 <http://creativecommons.org/publicdomain/zero/1.0/> | |
tell application "System Events" | |
set volumeSettings to get volume settings | |
set volumeValue to (output volume of volumeSettings) | |
set fadeTime to 10 -- time in seconds for fade change | |
set fadeChange to (volumeValue div fadeTime) | |
-- display alert "Volume: " & volumeValue & ", Delta: " & fadeChange | |
display dialog "Sleep time (min):" default answer "25" |
about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar.
Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and
rendering normally. Some settings may also make firefox unstable.
I am not liable for any damages/loss of data.
Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions
(HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".
<?php | |
add_filter( 'the_content', 'featured_image_in_feed' ); | |
function featured_image_in_feed( $content ) { | |
global $post; | |
if( is_feed() ) { | |
if ( has_post_thumbnail( $post->ID ) ){ | |
$output = get_the_post_thumbnail( $post->ID, 'medium', array( 'style' => 'float:right; margin:0 0 10px 10px;' ) ); | |
$content = $output . $content; | |
} | |
} |
CFLAGS = -std=gnu99 -Wall -Wextra -Os -nostdlib -m32 -march=i386 \ | |
-Wno-unused-function \ | |
-ffreestanding -fomit-frame-pointer -fwrapv -fno-strict-aliasing \ | |
-fno-leading-underscore \ | |
-Wl,--nmagic,-static,-Tmingw.com.ld | |
all: | |
gcc $(CFLAGS) -o hello.o hello.c | |
objcopy -O binary hello.o hello.com |