Skip to content

Instantly share code, notes, and snippets.

View vSanjo's full-sized avatar
Focusing

David Woodward vSanjo

Focusing
  • Full Stack Web Developer
  • Perth, Australia
View GitHub Profile
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@richardcornish
richardcornish / git.md
Last active August 11, 2023 08:44
Enough Git for your résumé in 100ish lines
@larrybotha
larrybotha / A.markdown
Last active February 7, 2024 15:20
Fix SVGs not scaling in IE9, IE10, and IE11

Fix SVG in <img> tags not scaling in IE9, IE10, IE11

IE9, IE10, and IE11 don't properly scale SVG files added with img tags when viewBox, width and height attributes are specified. View this codepen on the different browsers.

Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.

Use sed in bash to remove width and height attributes in SVG files

As per this answer on Stackoverflow, the issue can be resolved by removing just the width and height attributes.

@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@narze
narze / .laptop.local
Created October 27, 2014 04:02
Laptop customization file
#!/bin/sh
brew install caskroom/cask/brew-cask
brew tap caskroom/versions
brew cask install airmail-beta
brew cask install alfred
brew cask install arduino
brew cask install atom
brew cask install audacity
/*
===============================================================
## UTILS
===============================================================
*/
@mixin cover($image) {
background: url($image) no-repeat center center;
-webkit-background-size: cover;
-moz-background-size: cover;
@hfreire
hfreire / qemu_osx_rpi_raspbian_jessie.sh
Last active March 24, 2024 14:35
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

anonymous
anonymous / motd.tcl
Created February 14, 2017 15:27
#!/usr/bin/env tclsh
# MOTD script original? / mod mewbies.com
# Save as /etc/motd.tcl and add "/etc/motd.tcl" to the end of your /etc/profile
# You'll also need to:
# - sudo apt-get install tcl
# - delete the contents of /etc/motd
# - sudo chmod 755 /etc/motd.tcl
# - comment out "uname -snrvm > /var/run/motd.dynamic" in /etc/init.d/motd
# - change "PrintLastLog yes" to "PrintLastLog no" in /etc/ssh/sshd_config
@malko
malko / urlBase64ToUint8Array.js
Created March 31, 2017 12:58
used in pushManager.Subscribe to correctly encode the key to a Uint8Array
function urlBase64ToUint8Array(base64String) {
const padding = '='.repeat((4 - base64String.length % 4) % 4);
const base64 = (base64String + padding)
.replace(/\-/g, '+')
.replace(/_/g, '/')
;
const rawData = window.atob(base64);
return Uint8Array.from([...rawData].map((char) => char.charCodeAt(0)));
}