Skip to content

Instantly share code, notes, and snippets.

View guidoschmidt's full-sized avatar

Guido Schmidt guidoschmidt

View GitHub Profile
@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;}
}
#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/
@guidoschmidt
guidoschmidt / HTML meta tags
Last active August 29, 2015 14:22
HTML meta tags
<!-- META -->
<meta charset="utf-8">
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" >
<link rel="canonical" href="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="keywords"
content="" >
<meta name="description"
content="">
@guidoschmidt
guidoschmidt / Minted Syntax Highlighting
Created June 28, 2015 15:24
Minted Syntax Highlighting
\begin{minted}{cpp}
\end{minted}
@guidoschmidt
guidoschmidt / dumb.jsx
Created December 11, 2015 16:31
Dumb React Component
import React from 'react'
class Classname extends React.Component {
render() {
return (
<h1>Patients</h1>
)
}
}
Classname.defaultProps = {