Skip to content

Instantly share code, notes, and snippets.

View amitkaps's full-sized avatar

Amit Kapoor amitkaps

View GitHub Profile
@WebReflection
WebReflection / esx.md
Last active April 22, 2024 14:12
Proposal: an ESX for JS implementation
// paste in console of any https site to run (e.g. this page)
// sample arguments for registration
// https://fidoalliance.org/specs/fido-u2f-v1.1-id-20160915/fido-u2f-raw-message-formats-v1.1-id-20160915.html#authentication-response-message-success
var createCredentialDefaultArgs = {
publicKey: {
// Relying Party (a.k.a. - Service):
rp: {
name: "Acme"
},
@rxwei
rxwei / ad-manifesto.md
Last active November 9, 2023 09:58
First-Class Automatic Differentiation in Swift: A Manifesto
@atomkirk
atomkirk / parsce-csv-test.js
Last active February 13, 2023 09:19
parse csv with javascript
import parseCsv from 'zipbooks/utils/parse-csv'
import { module, test } from 'qunit'
module('Unit | Utility | parse-csv', function(_hooks) {
test('parses csv successfully', function(assert) {
let result = parseCsv('name,age\nadam,31\ntim,32\n"St, clair",26')
assert.equal(JSON.stringify(result), '[["name","age"],["adam","31"],["tim","32"],["St, clair","26"]]')
})
@leeper
leeper / ttttable.R
Last active May 19, 2021 22:38
Grammar of Tables?
# ttable: a grammar of tables
# https://gist.github.com/leeper/f9cfbe6bd185763762e126a4d8d7c286
# aggregate/summarize
# arrange
# annotation (metadata features)
# theme
@staltz
staltz / introrx.md
Last active April 29, 2024 09:25
The introduction to Reactive Programming you've been missing
@devilstower
devilstower / CiderControls7
Created January 26, 2014 03:12
Cider Controls 7.1
--# Main
-- Cider Controls 7.1
-- =====================
-- Designed for use with the Cider interface designer
-- Use this file to test and demostrate controls in the library
-- =====================
function setup()
displayMode(FULLSCREEN)
@enjalot
enjalot / _.md
Created May 12, 2013 06:32
codemirror widget test
@thelibrarian
thelibrarian / Fixing XCode Command Line Tools.md
Last active November 6, 2017 03:28
How to fix compile errors with the XCode command line tools on Mac OS X. Solves problems such as failing to find Framework header files (e.g. ruby.h).

The Problem

If you have installed the standalone Command Line Tools for XCode on your Mac (i.e. without having XCode.app installed), some of these tools can get a bit confused due to a couple of oversights on Apple's part in finalising the setup.

Note: all commands below will need to be run from an Administrator account, or by an account with appropriate permission in /etc/sudoers.

The Solution

1. Failing to Find Frameworks

Sometime when compiling against the preinstalled Frameworks (e.g. Ruby or Python), various tools will inexplicable fail to find header files that are quite clearly there. This is caused by the fact that no XCode has been selected for the command-line tools. Wait, I hear you cry, I don't have XCode installed! Indeed, but you nonetheless need to select one, and point it somewhere where the command line tools exist, like so

@mauryaratan
mauryaratan / htaccess-tweaks
Created May 7, 2012 13:43
htaccess Gzip Compression and expires to speed up page load time
<IfModule mod_deflate.c>
#The following line is enough for .js and .css
AddOutputFilter DEFLATE js css
AddOutputFilterByType DEFLATE text/plain text/xml application/xhtml+xml text/css application/xml application/rss+xml application/atom_xml application/x-javascript application/x-httpd-php application/x-httpd-fastphp text/html
#The following lines are to avoid bugs with some browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>