Skip to content

Instantly share code, notes, and snippets.

Avatar

Jennifer Culp JustJenFelice

  • Fremont, CA
View GitHub Profile
@JustJenFelice
JustJenFelice / ts-jest.md
Created Jan 14, 2020 — forked from jackawatts/ts-jest.md
Getting started with Typescript, React and Jest
View ts-jest.md

Getting Started

  1. Install:
  • jest: npm install --save-dev jest
  • ts-jest: npm install --save-dev ts-jest @types/jest
  1. Modify package.json
    "transform": {
      "^.+\\.tsx?$": "ts-jest"
    },
View gist:cb0a99fcf1ad872ec00c61f725b36a15
0bdd1dad7dae9158fdb9258c289ffbd4972792e444461257649d3c7a675024661e41e5937838f66b6ab22ad2f98f06dc5de35508d5c6a9274ec61c6b4b656b31
@JustJenFelice
JustJenFelice / sw-test-cleaup.js
Created Jul 18, 2017 — forked from gauntface/sw-test-cleaup.js
Function to unregister SW and clear out old caches.
View sw-test-cleaup.js
window.__testCleanup = () => {
const unregisterSW = () => {
return navigator.serviceWorker.getRegistrations()
.then((registrations) => {
const unregisterPromise = registrations.map((registration) => {
return registration.unregister();
});
return Promise.all(unregisterPromise);
});
};
@JustJenFelice
JustJenFelice / show-clicked-row-details-right-way.md
Created Jul 11, 2016 — forked from umidjons/show-clicked-row-details-right-way.md
Show clicked row details. Using ng-switch, ng-click, ng-class, ng-repeat, $index.
View show-clicked-row-details-right-way.md

Show clicked row details. Using ng-if, ng-repeat-start and ng-repeat-end directives

<!doctype html>
<html lang="en-US" ng-app="App">
<head>
	<meta charset="UTF-8">
	<script src="angular.js"></script>
	<title>Users</title>
View checkbox.css
/**
Usage (the label is required)
<input id="uid" type="checkbox" ... /><label for="uid">Label</label>
Produces styled checkboxes in IE9+, current Firefox and Chrome
Demo here: http://jsfiddle.net/7Fggq/
@author Bryan Elliott <ook@codemonkeybryan.com>
*/
View truecrypt_fix.bash
#!/bin/bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/libosxfuse_i32.la" \
"/usr/local/lib/libosxfuse_i64.la" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
View brewfix1-osxfuse.rb
#!/usr/bin/env ruby
#
# Homebrew fix 1 - osxfuse dylibs
#
# original solutions: https://gist.github.com/aaronzirbes/3239033
# https://gist.github.com/trinitronx/5437061
#
# Fixes the following:
#
# > Warning: Unbrewed dylibs were found in /usr/local/lib.
View _base-10-rem.scss
$base-font-size:16px;
@mixin base-10-rem($property, $values...) {
$length:length($values);
$base-value:10px;
$px-values:"";
$rem-values:"";
@for $i from 1 through $length {
$tmp:$base-value * nth($values, $i);
View bocoup-training-more-efficient-event-handlers.js
// Straightforward + simple.
$("button").on("click", function(event) {
event.preventDefault();
var button = $(this);
var numberElem = button.find(".number");
var number = Number(numberElem.text()) - 1;
numberElem.text(number);
if (number === 0) {
button.prop("disabled", true);
button.off("click");
View gist:5613795

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+ insert line after
You can’t perform that action at this time.