Skip to content

Instantly share code, notes, and snippets.

View qwertypants's full-sized avatar
🧶

Wilkins Fernandez qwertypants

🧶
View GitHub Profile
@kangax
kangax / deps_age.js
Last active March 29, 2023 20:19
Find average age of npm dependencies
const fs = require('fs');
const { exec } = require('child_process');
const moment = require('moment');
const _ = require('lodash');
const chalk = require('chalk');
fs.readFile('package.json', (err, data) => {
const { dependencies } = JSON.parse(data.toString());
let totalDays = 0;
@buzzedword
buzzedword / _mixins.scss
Last active August 29, 2015 14:04
Bootstrap default media queries
@mixin breakpoint($point) {
@if $point == large {
@media (min-width: 1200px) { @content; }
}
@else if $point == medium {
@media (min-width: 992px) and (max-width: 1119px) { @content; }
}
@else if $point == small {
@media (min-width: 768px) and (max-width: 991px) { @content; }
}
@carlynorama
carlynorama / IntelGalileoSDTestingFile.ino
Last active March 1, 2016 14:37
Use this file to see if writing to the SD card on the Intel Galileo Board works for you.
/*
// This code is to test SD Card function on an Intel Galileo Board
// It was complied from various examples which can be found:
//
// https://communities.intel.com/thread/46635
// https://communities.intel.com/message/229074
// http://arduino.cc/en/Reference/SD
// http://forum.arduino.cc/index.php?topic=57460.0
//
// Carlyn Maw 2014
@leostratus
leostratus / webkit-pseudo-elements.md
Created September 21, 2012 01:44
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

@callmephilip
callmephilip / gist:3626669
Created September 4, 2012 21:21
[JavaScript] Lock site in portrait mode in mobile Safari
// Kudos to Grumdrig
// http://stackoverflow.com/questions/1207008/how-do-i-lock-the-orientation-to-portrait-mode-in-a-iphone-web-application
$(document).ready(function () {
function reorient(e) {
var portrait = (window.orientation % 180 == 0);
$("body > div").css("-webkit-transform", !portrait ? "rotate(-90deg)" : "");
}
window.onorientationchange = reorient;
window.setTimeout(reorient, 0);
@sindresorhus
sindresorhus / LICENSE.txt
Created June 4, 2012 12:14 — forked from 140bytes/LICENSE.txt
Photo Booth (140byt.es)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com>
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
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@nzakas
nzakas / namespace.js
Created December 6, 2011 19:14
A single global with a namespace method
//BSD Licensed
var YourGlobal = {
namespace: function(ns){
var parts = ns.split("."),
object = this,
i, len;
for (i=0, len=parts.length; i < len; i++) {
if (!object[parts[i]]) {
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@deanlandolt
deanlandolt / chords.js
Created September 20, 2011 16:06
object traversal optimization and indexing
var notes = [{
"note": "A",
"chords": [
{
"chord": "maj7",
"strings": {
"1": 0,
"2": 3,