(draft; work in progress)
See also:
- Compilers
- Program analysis:
- Dynamic analysis - instrumentation, translation, sanitizers
(draft; work in progress)
See also:
#!/usr/bin/env python3 | |
from decimal import Decimal | |
import re | |
import yaml | |
from yaml.composer import Composer | |
from yaml.constructor import SafeConstructor | |
from yaml.parser import Parser | |
from yaml.reader import Reader | |
from yaml.resolver import BaseResolver, Resolver as DefaultResolver |
Principles of Adult Behavior
/* | |
After purchasing a humble book bundle, go to your download page for that bundle. | |
Open a console window for the page and paste in the below javascript | |
*/ | |
$('a').each(function(i){ | |
if ($.trim($(this).text()) == 'MOBI') { | |
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">'); | |
document.getElementById('dl_iframe_'+i).src = $(this).data('web'); | |
} | |
}); |
print("UPDATE AUG 2023: this script is beyond old and broken") | |
print("You may find interesting and more up to date resources in the comments of the gist") | |
exit() | |
from slacker import Slacker | |
import json | |
import argparse | |
import os | |
# This script finds all channels, private channels and direct messages |
# EdgeOS v1.9 Google Fiber Config Script | |
# by Steve Jenkins (http://www.stevejenkins.com/) | |
# Last updated: Aug 14, 2016 | |
# Based on settings & scripts by Atlantisman, TK, and CompTech | |
# RUN THIS SCRIPT AS ROOT ON YOUR EDGEROUTER | |
# Script runs best if you copy and paste in sections | |
#______________________Basic Firewall Setup_______________________________ | |
configure |
Constant lookup in Ruby can happen lexically or through the ancestry tree of the receiver(a class or module). You can identify which lookup rules are being applied by the context you're in or by the syntax being used to define a class or module.
A class body that is defined as class A::B::C; …; end
will lookup
constants through the ancestry tree when a constant is evaluated in
its class body. Anytime you see A::B::C
being used as syntax to
define a class or lookup the value of a constant the ancestry tree
is being used for the lookup.
(The blockquote style does not look so well so I just pasted directly, but these are all quoted from the links in the bottom of this page)
You should not implement to_str
unless your object acts like a string, rather than just having a string representation. The only core class that implements to_str
is String itself.
[to_i and to_s] are not particularly strict: if an object has some kind of decent representation as a string, for example, it will probably have a to_s method… [to_int and to_str] are strict conversion functions: you implement them only if you object can naturally be used every place a string or an integer could be used.
to_str
is used by methods such as String#concat
to convert their arguments to a string. Unlike to_s, which is supported by almost all classes, to_str
is normally implemented only by those classes that act like strings. Of the built-in classes, only Exception
and String
implement to_str
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' |
#import <UIKit/UIKit.h> | |
@interface UIView (SMFrameAdditions) | |
@property (nonatomic, assign) CGPoint $origin; | |
@property (nonatomic, assign) CGSize $size; | |
@property (nonatomic, assign) CGFloat $x, $y, $width, $height; // normal rect properties | |
@property (nonatomic, assign) CGFloat $left, $top, $right, $bottom; // these will stretch the rect | |
@end |