This file contains 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 python | |
# Script for comparing Pillow vs PyVIPS used for this issue: | |
# https://github.com/libvips/pyvips/issues/148 | |
import sys | |
import timeit | |
import pyvips |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Broken CSS Filters Referencing SVG</title> | |
<style> | |
body { | |
display: grid; | |
grid-template-columns: max-content 25vh; | |
grid-template-rows: 2em 25vh 25vh 25vh; | |
align-items: center; |
This file contains 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
/node_modules | |
/package-lock.json | |
/*.gz |
This file contains 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
function FindProxyForURL(url, host) { | |
if (shExpMatch(host, "cdn.clinicalkey.com")) { return "DIRECT" }; | |
if ( | |
//manual | |
//shExpMatch(host,"*intranet.sum.edu.pl") || | |
shExpMatch(host,"*interactelsevier.com") || | |
shExpMatch(host,"*ebrary.com") || | |
shExpMatch(host,"*intechopen.com") || |
This file contains 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 Parent: | |
_SHARED_ONLY_FOR_READING = None | |
@classmethod | |
def get_shared(cls): | |
if not cls._SHARED_ONLY_FOR_READING: | |
cls._SHARED_ONLY_FOR_READING = cls.__name__ | |
return cls.__name__ | |
def print_shared(self): |
This file contains 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
// | |
// dispatch.swift | |
// | |
// Created by Adam Wróbel. Read more at: | |
// http://adamwrobel.com/blog/2016/05/08/swift-gcd-wrapper/ | |
// | |
import Foundation | |
internal extension dispatch_queue_t { |
This file contains 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
swiftc -v test.swift | |
Apple Swift version 2.2 (swiftlang-703.0.18.1 clang-703.0.29) | |
Target: x86_64-apple-macosx10.9 | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file test.swift -target x86_64-apple-macosx10.9 -enable-objc-interop -color-diagnostics -module-name test -o /var/folders/0y/7j1jzys50dx1dwrs60r_5d9r0000gn/T/test-23b3ad.o | |
test.swift:6:8: error: type 'Error' cannot be defined within a protocol extension | |
enum Error: ErrorType {case IsntOk} | |
^ | |
test.swift:10:13: error: initializing from a metatype value must reference 'init' explicitly | |
throw Error.IsntOk | |
^ |
This file contains 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
# lib/capistrano/tasks/assets.rake | |
require "concurrent/hash" | |
# This task tests that hash digests of generated JS and CSS files are the same on every | |
# asset server. This should always be the case if Sprockets and Uglifier do their job | |
# well, but I've once had a problem with that. Once bitten, twice shy. | |
# | |
# We do not send compiled CSS&JS files to our asset servers, instead we're asking the | |
# servers to compile and minify them from source. If the process varies between servers |
This file contains 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
require "rubocop" | |
class OpenEditor < RuboCop::Formatter::ProgressFormatter | |
VimFamily = %w{vim gvim mvim} | |
def report_file file, offenses | |
super | |
if editor_supports_lines? | |
offenses.each do |offense| |
This file contains 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
require "bson" | |
require "digest/sha2" | |
d = Digest::SHA256.new | |
d << "test" | |
string = d.digest | |
puts string.encoding | |
binary = BSON::Binary.new string | |
puts binary.to_bson |
NewerOlder