Skip to content

Instantly share code, notes, and snippets.

View oskarkrawczyk's full-sized avatar
😰
That shouldn't be working but it does

Oskar Krawczyk oskarkrawczyk

😰
That shouldn't be working but it does
View GitHub Profile
@oskarkrawczyk
oskarkrawczyk / git-sync
Last active December 18, 2015 02:39 — forked from pch/git-sync
No need to inform about this
#!/bin/bash
SYNC_COLOR_YELLOW="\033[33m"
SYNC_COLOR_GREEN="\033[32m"
SYNC_COLOR_NONE="\033[0m"
git_branch() {
branch=$(git symbolic-ref HEAD 2>/dev/null | awk -F/ {'print $NF'})
}
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>ti</title>
<script type="text/ruby" charset="utf-8">
dirs = `ls`
</script>
</head>
</html>
(function(){
var Animal = this.Animal = new Class({
initialize: function(){
console.log('Animal');
}
});
}).call(this);
body, ul, li, p, h1, h2, h3, h4, address, ol, dd, dt, dl, fieldset, form, label, input, textarea, legend, a, a:link, img {
color: #000;
padding: 0;
margin: 0;
list-style: none;
border: none;
font-style: normal;
font-weight: normal;
font-family: Georgia, 'Times New Roman', Times, serif;
text-decoration: none;
@oskarkrawczyk
oskarkrawczyk / nuTabs.js
Created September 8, 2009 17:06
MooTools-based, transitionified switcherification
/*
---
script: nuTabs.js
decription: nuTabs - MooTools-based, transitionified switcherification
license: MIT-style license.
authors:
- Oskar Krawczyk (http://nouincolor.com/)
requires:
core:1.2.3:
- Class.Extras
// Scott Kyle (http://appden.com)
function $E(tag, props) {
if(typeof props == 'string')
props = {style: props};
if(typeof tag == 'string') {
var id = tag.match(/#([\w-]+)/);
var classes = tag.match(/(?:\.[\w-]+)+/);
tag = tag.replace(/[#.].*/, '');
props = props || {};
@oskarkrawczyk
oskarkrawczyk / $log.js
Created June 12, 2009 14:41
$log will not cause errors in IE
// $log will not cause errors in IE
// Author: Oskar Krawczyk (oskar dot krawczyk dot com after nouincolor)
Window.implement({
$log: function() {
if(typeof console!=='undefined' && typeof console.log !== 'undefined') {
console.log(arguments.length <= 1 ? arguments[0] : arguments);
}
}
});
@oskarkrawczyk
oskarkrawczyk / external.js
Created June 10, 2009 15:21
Returns all links that are not on the same domain as the website is.
/* Returns all links that are not on the same domain as the website is.
*
* $$('a:external') - Automatically checks for the domain name
* $$('a:external(example.com)') - Set a custom, base domain
*
* Example:
*
* $$('a:external').each(function(popup) {
* popup.addEvent('click', function(e) {
* e.stop();
Array.implement({
first: function() {
return this[0];
},
rest: function() {
return this.slice(1, this.length);
},
drop: function(n) {
@oskarkrawczyk
oskarkrawczyk / Array.equalize.js
Created May 19, 2009 19:07
Equalize dimensions of a set of elements
/* Equalizes dimensions of selected elements.
*
* els.equalize();
*
* Example:
*
* $$('.boxes').equalize('height', 'max', 20);
* $$('.boxes').equalize('width', 'min');
* $$('.boxes').equalize('height');
*