Skip to content

Instantly share code, notes, and snippets.

View guidoschmidt's full-sized avatar

Guido Schmidt guidoschmidt

View GitHub Profile
@guidoschmidt
guidoschmidt / shader.vert.glsl
Created August 14, 2013 15:09
GLSL: empty vertex shader
//VERTEX SHADER
#version 400
//*** Uniform block definitions ************************************************
//*** Input ********************************************************************
//*** Output *******************************************************************
//*** Uniforms *****************************************************************
@guidoschmidt
guidoschmidt / shader.frag.glsl
Created August 14, 2013 15:10
GLSL: empty fragment shader
//FRAGMENT SHADER
#version 400
//*** Uniform block definitions ************************************************
//*** Input ********************************************************************
//*** Output *******************************************************************
//*** Uniforms *****************************************************************
@guidoschmidt
guidoschmidt / mediaqueries.css
Created January 12, 2015 09:28
CSS Media Queries
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@guidoschmidt
guidoschmidt / second_applet_window.pde
Last active August 29, 2015 14:15
Create second Applet window
import controlP5.*;
ControlP5 cp5;
void setup()
{
size(800, 800, P2D);
cp5 = new ControlP5(this);
cp5.addSlider("slider")
.setRange(0, 200)
@guidoschmidt
guidoschmidt / controlP5_example.pde
Last active August 29, 2015 14:15
Minimal ControlP5
import controlP5.*;
import javax.swing.JFrame;
PFrame f = null;
Applet s;
ControlP5 cp5;
void setup()
{
@guidoschmidt
guidoschmidt / Simple Cube
Created February 17, 2015 23:51
Create simple cube for OpenGL rendering
void SimpleCube::init()
{
//front
normals.emplace_back(glm::vec3(0,0,1));
vertices.push_back(glm::vec3(-0.5,-0.5,0.5));
vertices.push_back(glm::vec3(0.5,-0.5,0.5));
vertices.push_back(glm::vec3(0.5,0.5,0.5));
vertices.push_back(glm::vec3(-0.5,0.5,0.5));
//side right
normals.emplace_back(glm::vec3(1,0,0));
https://www.dropbox.com/s/l494et4memth44a/WindowsNoEditor.7z?dl=0
@guidoschmidt
guidoschmidt / CSS3 Keyframe Animation Boilerplate
Created March 6, 2015 16:55
CSS3 Keyframe Animation Boilerplate
/* Standard */
@keyframes fadeIn {
to {opacity: 1.0;}
}
/* Webkit-Based (Chrome, Safari) */
@-webkit-keyframes fadeIn {
to {opacity: 1.0;}
}
@guidoschmidt
guidoschmidt / bootstrap3-vertical-menu.css
Last active January 14, 2021 15:01
Bootstrap CSS Vertical Menu
/*
As proposed by http://www.jonathanbriehl.com/
*/
/* make sidebar nav vertical */
@media (min-width: 768px) {
.sidebar-nav .navbar .navbar-collapse {
padding: 0;
max-height: none;
}
.sidebar-nav .navbar ul {
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/