Skip to content

Instantly share code, notes, and snippets.

View papaponmx's full-sized avatar

Jaime Rios papaponmx

View GitHub Profile
@papaponmx
papaponmx / Contract Killer 3.md
Created February 11, 2016 05:35 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: October 8th 2015
  • Original post

@veganista
veganista / file.liquid
Created April 20, 2016 10:56
Debugging Objects in Shopify Templates
<script>console.log({{ product | json }});</script>
export const GoogleApi = function(opts) {
opts = opts || {}
const apiKey = opts.apiKey;
const libraries = opts.libraries || [];
const client = opts.client;
const URL = 'https://maps.googleapis.com/maps/api/js';
const googleVersion = '3.22';
let script = null;
@nickytonline
nickytonline / .gitconfig
Last active February 17, 2021 03:34
Git Aliases
alias.a add .
alias.aliases config --get-regexp alias
alias.bi bisect
alias.ci commit -m
alias.co checkout
alias.colast checkout -
alias.db branch -D
alias.laf fsck --lost-found
alias.last log -1 HEAD
alias.nb checkout -b
@singhshivam
singhshivam / Immutable JS Examples
Last active August 5, 2023 19:16
Immutable JS Examples
List()
var list = Immutable.List([1,2,3])
// [1, 2, 3]
List.isList()
Immutable.List.isList(list)
// true
List.of()
var list = Immutable.List.of(1,2,3);
@geoffreydhuyvetters
geoffreydhuyvetters / react_fiber.md
Last active January 13, 2023 06:49
What is React Fiber? And how can I try it out today?
@ateucher
ateucher / setup-gh-cli-auth-2fa.md
Last active May 3, 2024 11:06
Setup git on the CLI to use 2FA with GitHub

These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.

  1. Download and install the git command-line client (if required).

  2. Open the git bash window and introduce yourself to git (if required):

    git config --global user.name 'Firstname Lastname'
    git config --global user.email 'firstname.lastname@gov.bc.ca'
    
@papaponmx
papaponmx / test.js
Created February 19, 2018 17:15
Selenium webdriver assertion with chai and ES6.
// Require chai.js expect module for assertions
const chai = require('chai');
const expect = require('chai').expect;
// Application Server
const serverUri = '0.0.0.0:3000';
// Official selenium webdriver testing setup
const webdriver = require('selenium-webdriver');
@glued
glued / theme.js
Last active October 8, 2019 19:31
Check for OS Dark Theme in the browser
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
@Fl0pZz
Fl0pZz / browser_detect.js
Last active January 13, 2022 06:56 — forked from 2107/browser_detect.js
JavaScript: Detect Browser
// browser detect
var BrowserDetect = {
init: function(userAgent, appVersion) {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(userAgent) || this.searchVersion(appVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function(data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;