Skip to content

Instantly share code, notes, and snippets.

View swistak's full-sized avatar

Marcin Raczkowski swistak

  • Poland, Kraków
View GitHub Profile
@mojaray2k
mojaray2k / jsbin.burut.html
Last active September 19, 2023 15:42
CSS only custom-styled select Todd Parker - Filament Group Inc. How this works: This styles a native select consistently cross-platform with only minimal CSS. The native select is then styled so it is essentially invisible (no appearance, border, bg) leaving only the select's text visible. There is a wrapper around the select that has the majori…
<html>
<head>
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
}
@massar
massar / server-git.conf
Created March 6, 2014 21:14
Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
# jeroen@massar.ch - http://jeroen.massar.ch
server {
listen 192.0.1.1:80;
listen [2001:db8::1]:80;
# Redirect all non-HTTPS traffic to the HTTPS variant
return 301 https://$host$request_uri;
}
@stonehippo
stonehippo / smartcore_arduino_pin_mapping.md
Last active January 5, 2019 22:07
Mapping Smartmaker Smartcore CPU pins to Arduino pins.

Pin Mapping the Smartmaker Smartcores to Arduino Pins

This note details the pin mappings for the Smartmaker Smartcore microcontrollers to Arduino standards pins.

Smartmaker Smartcore: A Brief Intro

The Smartmaker1 Smartcores are small-form-factor Arduino clones.

The special thing about Smartcores is their use of the Smartmaker Open System I/O Smartbus, which is basically a snap-together bus interface for components based on pairs of the Hirose DF9-31 connector. There are two flavors of the bus, Smartbus Basic with two connector (A+B) and Smartbus Full which add two additional connectors (A+B+C+D). Each connector has 31 pins, which are assigned different purposes. The Smartmaker Wiki has more details on the Smartbus configuration.

@julik
julik / transactional.rb
Created November 1, 2011 18:27
Transactional database in Minitest in 7 lines of code
module TransactionalTests
# See minitest doco - use_transactional_fixtures_but_in_ruby
# to use include this into your test case
def run(runner)
test_result = nil
ActiveRecord::Base.transaction { test_result = super; raise ActiveRecord::Rollback }
test_result
end
end