Skip to content

Instantly share code, notes, and snippets.

View pandafulmanda's full-sized avatar

Amanda Shih pandafulmanda

View GitHub Profile
@zeroasterisk
zeroasterisk / client_application.js
Last active September 22, 2018 17:15
MeteorJS code for attaching PhoneGap events, and doing things inside MeteorJS. note: as of now, I'm loading cordova via an AJAX request because it was complaining on direct compile (js bugs in console)... I may keep working on getting it to load with the site/app directly, but the rest of the attached events would remain the same, just without t…
// initialize as soon as the DOM is ready
Session.set('CordovaLoaded', false);
Meteor.startup(function() {
console.log('cordova loading');
// delay loading of cordova until after DOM is ready
// determine WHICH cordova to load
var cordovajspath = '/cordova-2.6.0.js';
if (navigator.userAgent.match(/(iPad|iPhone|iOS)/) != null) {
cordovajspath = '/cordova-2.6.0-ios.js';
} else if (navigator.userAgent.match(/(Android)/) != null) {
@shaunlebron
shaunlebron / paperprograms-api.md
Last active October 1, 2018 14:33
Paper Programs API

Paper Programs API

Welcome to Paper Programs! Here's a quick reference followed by longer descriptions:

Quickref

// IMPORTS
importScripts('paper.js');
importScripts('http://.js');
@IronistM
IronistM / setup-elementary.sh
Last active May 8, 2023 18:52 — forked from floriancourgey/setup-elementary.sh
Things to do after installing elementary OS Loki 0.4
#Start with a dist upgrade
sudo apt dist-upgrade
# Get chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i ./google-chrome*.deb
sudo apt-get install -f
# dev (php, docker, git, node, bower, electron, composer)
sudo apt install -y \
@doowon
doowon / jupyter
Last active October 15, 2023 17:46 — forked from jmtatsch/jupyter
A service (init.d) script for jupyter
#! /bin/sh
### BEGIN INIT INFO
# Provides: jupyter
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start jupyter
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@domenic
domenic / 0-github-actions.md
Last active October 18, 2023 15:35
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@mhawksey
mhawksey / gist:1276293
Last active October 23, 2023 09:00
Google App Script to insert data to a google spreadsheet via POST or GET - updated version as per https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@addyosmani
addyosmani / README.md
Last active February 18, 2024 21:11 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@jo
jo / js-crypto-libraries.md
Last active March 11, 2024 13:16
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active March 20, 2024 18:46
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@staltz
staltz / introrx.md
Last active March 26, 2024 00:52
The introduction to Reactive Programming you've been missing