Skip to content

Instantly share code, notes, and snippets.

View apertureless's full-sized avatar
:shipit:
Finding ...<b>u</b>

Jakub apertureless

:shipit:
Finding ...<b>u</b>
View GitHub Profile
@apertureless
apertureless / RFrame.js
Last active August 29, 2015 14:11
Responsive iFrame js
jQuery(document).ready(function( $ ){
function responsiveFrame() {
$( 'iframe' ).each(function(){
var fh = $( this ).height();
var fw = $( this ).width();
var fp = $( this ).parent().width();
var fpw = fp/fw;
var fpwh = Math.round( fh*fpw );
$( this ).css({
@apertureless
apertureless / textarea-max.js
Created January 13, 2015 11:34
Remaining characters counter for textareas
/*
Display remaining characters in a textarea.
*/
(function($) {
// Get every teatarea
$( 'textarea[maxlength]' ).each(function(){
// Add listener
$(this).on('input propertychange', function() {
// Parse maxlength attribute
var max = parseInt($( this ).attr( 'maxlength' ));
@apertureless
apertureless / whs-gui-01.java
Last active August 29, 2015 14:17
GUI Klausur WS 14/15 Lernhilfen & nützliche Code snippets
/**
* Methode für das Beenden der Anwendung mit Bestätigungsdialog
*/
private void closePromt() {
int close;
close = JOptionPane.showInternalConfirmDialog(desktopPane, "Programm Beenden?", "Anwendung beenden.", JOptionPane.YES_NO_OPTION);
if (close == 0) {
System.exit(0);
}
@apertureless
apertureless / DateVerifier.java
Last active August 29, 2015 14:17
Java DateFormatter
import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;
import javax.swing.InputVerifier;
import javax.swing.JComponent;
import javax.swing.JFormattedTextField;
import javax.swing.JOptionPane;
public class DatumVerifier extends InputVerifier {
@apertureless
apertureless / ANI-2015-Praktikum-0.py
Last active August 29, 2015 14:18
ANI Praktium 0
# Wichtige Module Importieren
import bpy
import math
# Etwas Schreibarbeit sparen
objects = bpy.data.objects
context = bpy.context
ops = bpy.ops
ops.object.duplicate_move()
@apertureless
apertureless / ANI-2015-Praktikum-1.py
Created April 21, 2015 09:59
Wheel animationscript for blender
# Wichtige Module importieren
import bpy
import math
# Variablen
dauer = 5
strecke = 10
durchmesser = bpy.context.object.dimensions.z
umfang = durchmesser * math.pi
@apertureless
apertureless / ANI-2015-Praktikum-2.py
Last active August 29, 2015 14:19
Basketball Bounce animation script
import bpy
import math
# Variablen
d = 0.25 # Durchmesser
h = 1.7 # Hoehe
v = 0.8 # Geschwindigkeit
g = 9.81 # Erdanziehung
import bpy
import math
# Variablen
durchmesser = 0.25 #object.dimensions[0]
höhe = 1.7
wurfgeschwindigkeit = 3
g = 9.81
@apertureless
apertureless / Contract Killer 3.md
Created September 23, 2015 16:12 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@apertureless
apertureless / bem.less
Created January 23, 2016 17:59 — forked from vivid-web/bem.less
BEM Helper (SCSS, SASS, LESS, Stylus)
// Mixins
.has(@element; @content) {
&__@{element} {
@content();
}
}
.variant(@modifier; @content) {
&--@{modifier} {
@content();