Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Writing lots of poetry this summer

George Jempty dexygen

💭
Writing lots of poetry this summer
  • Dexygen
  • Carrollton, TX (suburb of Dallas)
View GitHub Profile
@iamlucamilan
iamlucamilan / breakpoints.css
Created Jul 1, 2016
Most common responsive breakpoints
View breakpoints.css
/* 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) {
/* Styles */
}
@noelboss
noelboss / git-deployment.md
Last active Sep 19, 2021
Simple automated GIT Deployment using Hooks
View git-deployment.md

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@sebmarkbage
sebmarkbage / Enhance.js
Last active Sep 11, 2021
Higher-order Components
View Enhance.js
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@zapthedingbat
zapthedingbat / logeverything.js
Created Aug 19, 2014
Log every function call to the console
View logeverything.js
(function() {
var call = Function.prototype.call;
Function.prototype.call = function() {
console.log(this, arguments);
return call.apply(this, arguments);
};
}());
@bartholomej
bartholomej / css-media-queries-cheat-sheet.css
Last active Sep 16, 2021
CSS Media Query Cheat Sheet (with Foundation)
View css-media-queries-cheat-sheet.css
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@noodlehaus
noodlehaus / web_app.php
Last active Dec 15, 2017
bare bones routing function for PHP.
View web_app.php
<?php
// minimal routing
function web_app($routes, $req_verb, $req_path) {
$req_verb = strtoupper($req_verb);
$req_path = trim(parse_url($req_path, PHP_URL_PATH), '/');
$found = false;
if (isset($routes[$req_verb])) {
@dexygen
dexygen / meek.js
Last active Dec 20, 2015
Genuinely Unobtrusive Javascript
View meek.js
(function(scope) {
function destroyAutoGlobals(options) {
var allElements = document.getElementsByTagName("*"), elementId;
for (var i=allElements.length; i--; ) {
elementId = allElements[i].id;
if (elementId && window[elementId] instanceof HTMLElement) {
options && options.verbose && console.log('Destroying window["' + elementId + '"]');
window[elementId] = null;
@mxriverlynn
mxriverlynn / 1.html
Created Apr 11, 2012
modal dialog with backbone
View 1.html
<script id="modal-view-template" type="text/html">
<div class="modal-header">
<h2>This is a modal!</h2>
</div>
<div class="modal-body">
<p>With some content in it!</p>
</div>
<div class="modal-footer">
<button class="btn">cancel</button>
<button class="btn-default">Ok</button>
@eriwen
eriwen / qunit-to-junit-for-phantom.js
Created Nov 14, 2011
JUnit XML output for QUnit tests compatible with PhantomJS 1.3
View qunit-to-junit-for-phantom.js
var module, moduleStart, testStart, testCases = [],
current_test_assertions = [];
console.log('<?xml version="1.0" encoding="UTF-8"?>');
console.log('<testsuites name="testsuites">');
QUnit.begin = function() {
// That does not work when invoked in PhantomJS
}
QUnit.moduleStart = function(context) {
moduleStart = new Date();
@dmitry
dmitry / backbone-mixin.js
Created Oct 1, 2011 — forked from wesen/backbone-mixin.js
Merge backbone views (mixin pattern)
View backbone-mixin.js
/**
* ## Merging mixin views in backbone.js ##
*
* really just more a test for tumblr gistr
*/
/**
* Merge the mixin (a Backbone.View) into another Backbone.View. Automatically merge events, defaults, and call the parent initializer.
**/
function mergeMixin(view, mixin) {