Automated analysis is the main advantage to working with a modern statically typed compiled language like C++. Code analysis tools can inform us when we have implemented an operator overload with a non-canonical form, when we should have made a method const, or when the scope of a variable can be reduced.
| import zlib | |
| """ | |
| zlib.compressobj(...) ⇒ deflateInit(...) | |
| compressobj.compress(...) ⇒ deflate(...) | |
| zlib.decompressobj(...) ⇒ inflateInit(...) | |
| decompressobj.decompress(...) ⇒ inflate(...) | |
| """ | |
| def deflate(data, compresslevel=9): | |
| compress = zlib.compressobj( | |
| compresslevel, # level: 0-9 |
| # | |
| # Vagrantfile for testing | |
| # | |
| Vagrant::configure("2") do |config| | |
| # the Chef version to use | |
| config.omnibus.chef_version = "11.4.4" | |
| def configure_vbox_provider(config, name, ip, memory = 384) | |
| config.vm.provider :virtualbox do |vbox, override| |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
| { | |
| "Version": "2008-10-17", | |
| "Id": "0c762de8-f56b-488d-a4a4-20d1cb31df2f", | |
| "Statement": [ | |
| { | |
| "Sid": "Allow in my domains", | |
| "Effect": "Allow", | |
| "Principal": { | |
| "AWS": "*" | |
| }, |
| <cfscript> | |
| QueueName = "QTransactions"; | |
| durable = true; | |
| loadPaths = arrayNew(1); | |
| loadPaths[1] = expandPath("lib/rabbitmq-java-client-bin-2.8.4/rabbitmq-client.jar"); | |
| // load jars | |
| javaLoader = createObject("component", "lib.javaloader.JavaLoader").init(loadPaths); |
| ; nasm hello.asm -o hello.com | |
| ; dosbox hello.com | |
| bits 16 | |
| org 0x0100 | |
| mov ah,0x09 | |
| mov dx,str_hello | |
| int 0x21 | |
| int 0x20 |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <netinet/tcp.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <netinet/in.h> |