Skip to content

Instantly share code, notes, and snippets.

View cybear's full-sized avatar

Björn Söderqvist cybear

  • Greenfield AB
  • Malmo, Sweden
View GitHub Profile
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@hallgren
hallgren / gist:02d1f9e61b43a331baa2
Last active August 29, 2015 14:13
Demodag - Björn
Tänkte sammanfatta vad vi pratade om och få ner lite länkar till de saker som kom upp.
http://reactize-todo.herokuapp.com är som @ptomasroos nämde byggt enligt ROCA http://roca-style.org/ vilket jag inte hade någon aning om när jag satte ihop den. Kul att det fanns ett namn på tankesättet.
Boken Adaptive Web Design http://kammerkunst.de/data/Adaptive-Web-Design.pdf beskriver hur webben var tänkt att fungera med kontent först via HTML och att sedan CSS och Javascript lades på som lager för att utöka upplevelsen för de som hade stöd för det.
Jag nämde att jag tagit mycket inspration från Ryan Singer från 37Signals / Basecamp på hur han designar och tänker när han skapar sina UI / Flöden. "Designing with Forces: How to Apply Christopher Alexander in Everyday Work" http://interactiondesign.sva.edu/archive/view/video_ryan_singer_lecture/ är en bra video där han beskriver hur han tänker. Diskutterar gärna denna mer ingående om du finner den intressant.
Ryan var även med i podcasten full stack radio http://full

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@mhenrixon
mhenrixon / cs_merge
Last active February 1, 2020 03:43
How we merged multiple github repos into a monolithic project repo
#!/bin/bash
#
# This script merges all the repos we have into subfolders in a new repo
#
# Clones or copies a repository from either disc or remote repository.
cloppy() {
local dir=$1
if [[ -z $2 ]]; then
local repo=$dir
angular.module('myServices')
.factory('visibilityBroadcaster', function($rootScope, $document, _) {
var document = $document[0],
features,
detectedFeature;
features = {
standard: {
eventName: 'visibilitychange',
// Large swatches copied from jQuery.
// "cargo-culting, makes me happy" Don Ho we love you!!
Snap.plugin(function (Snap, Element ) {
// Used for splitting on whitespace
var core_rnotwhite = /\S+/g,
rclass = /[\t\r\n\f]/g,
@j-mcc1993
j-mcc1993 / Arduino_NES_Controller.ino
Last active January 1, 2016 21:19
Arduino Sketch that handles serial communication between NES controller and Arduino
int latch = 7; //signals controller to latch button states
int pulse = 5; //toggle to shift out button states
int data = 9; //data in line
int data_byte; //byte that stores button states
int count[] = {0,0,0,0,0,0,0,0}; //each value stores 1 or 0 indicating whether a key is currently pressed
char keys[] = {'a','b','s','d','u','j','l','r'}; //keyboard keys to be pressed
int tempbit; //iterates over the data_byte to grab each button's state
void setup() {
pinMode(latch, OUTPUT);
@eendeego
eendeego / Gruntfile.js
Created July 5, 2013 16:57
How to delay responses on connect middleware, eg, to test timeouts, on a yeoman's generated gruntfile.
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// ...
@gausby
gausby / .gitignore
Last active December 14, 2015 08:29
git init ... How I currently start off my personal Node projects. Folder structure: README.md ; /lib/ ; /package.json ; /.jshintrc ; /Gruntfile.js ; /.gitignore ; /test/ ; /test/buster.js ; Discuss! (Files can't be in subdirectories in gists, but every config file, except for the buster.js file, is located in the root of the project--the buster.…
/node_modules/
/docs/
/benchmarks/results.csv
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………