Skip to content

Instantly share code, notes, and snippets.

@cheeaun
cheeaun / app.yaml
Created April 21, 2011 00:54
Simple static site hosting for Google App Engine WITHOUT any Python code at all. Just include this file, BOOM.
application: YOURAPPNAME
version: 1
runtime: python
api_version: 1
handlers:
- url: /
static_files: index.html
upload: index.html
- url: /(.*)
@trumbitta
trumbitta / .bash_aliases
Last active September 2, 2016 21:00 — forked from henrik/.bashrc
My version with tweaks and inspiration from holman/dotfiles
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
alias git=hub
alias gis="git status"
alias gits="git status"
alias gitp="git pull"
alias safepull="git stash && git pull && git stash apply"
@milligramme
milligramme / bash_completion
Created January 20, 2012 08:13
brew install bash-completion
$ brew install bash-completion
==> Downloading http://bash-completion.alioth.debian.org/files/bash-completion-1.3.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/bash-completion/1.3
==> make install
==> Caveats
Add the following lines to your ~/.bash_profile file:
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
['touchstart', 'touchmove', 'touchend'].each(function(type){
Element.NativeEvents[type] = 2;
});
Element.Events.swipe = {
onAdd: function(fn){
var startX, startY, active = false;
var touchStart = function(event){
active = true;
@cheeaun
cheeaun / feed-readers-comparison.md
Last active April 28, 2023 03:25
Feed Readers comparison

Feed Readers comparison

My comparison notes for web-based remotely-hosted Google Reader clones/replacements. Has to be at least 90% similar to Google Reader and not some Pinterest-like or Instapaper-like apps.

Here's a list of almost all Google Reader alternatives. And another one here.

In no particular order, here goes:

CommaFeed

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@simoneloru
simoneloru / full_content.xml
Last active December 28, 2015 21:49
Content with all attributes
<contenttype typecode="CNT" typedescr="Generic Content" viewpage="**NULL**" listmodel="**NULL**" defaultmodel="**NULL**">
<attributes>
<attribute name="Attach" attributetype="Attach" />
<attribute name="Boolean" attributetype="Boolean" />
<attribute name="CheckBox" attributetype="CheckBox" />
<attribute name="Composite" attributetype="Composite">
<attributes>
<attribute name="Attach" attributetype="Attach" />
<attribute name="Boolean" attributetype="Boolean" />
<attribute name="CheckBox" attributetype="CheckBox" />
@DavyLandman
DavyLandman / ssh-ssl-in-one.js
Last active July 20, 2017 09:41
A recent nodejs trick, hide the ssh agent behind a https port. This means you can serve stuff via https, and almost always login into ssh (since the 443 port is hardly filtered/proxied).And if you have ssh, well all bets are off ;-)
var net = require('net');
net.createServer(httpsSshSwitch).listen(443);
// if the first byte is 22, it is a https handshake,
// so redirect it to the actual https server (running on port 8443)
// else redirect it to the ssh instance.
//
// some ssh clients wait for the server to send the first welcome message
// so if we have not seen any data for 2 seconds, assume it is a ssh connection
@larsnystrom
larsnystrom / Start Hotspot.desktop
Created January 10, 2014 15:07
Desktop entry files for starting and stopping ap-hotspot, a script for setting upp wireless hotspots in Access Point Mode. Information about ap-hotspot can be found on http://www.webupd8.org/2013/06/how-to-set-up-wireless-hotspot-access.html Save these two files to your desktop and make them executable. If you'd like to run them from the dash yo…
[Desktop Entry]
Name=Start Hotspot
Comment=Start a wireless hotspot in Access Point Mode
Exec=gksudo /usr/bin/ap-hotspot start
Icon=/usr/share/icons/gnome/48x48/devices/network-wireless.png
Terminal=false
Type=Application
Categories=Network;
@bradfrost
bradfrost / gist:59096a855281c433adc1
Last active September 4, 2023 15:01
Why I'm Not A JavaScript Developer

Answering the Front-end developer JavaScript interview questions to the best of my ability.

  • Explain event delegation

Sometimes you need to delegate events to things.

  • Explain how this works in JavaScript

This references the object or "thing" defined elsewhere. It's like "hey, thing I defined elsewhere, I'm talkin' to you."

  • Explain how prototypal inheritance works.