Skip to content

Instantly share code, notes, and snippets.

View llkats's full-sized avatar
💭
still affable

Lydia Kats llkats

💭
still affable
View GitHub Profile
@jordwalke
jordwalke / gist:6350319
Last active September 10, 2016 16:27
ReactJS: JavaScript just like you've always done it.
/**
* ReactJS: JavaScript like you've always done it.
*
* This example renders your top ten most followed friends/followers, `filter`ing
* only your favorites, and putting a star on all verified accounts.
*
* With ReactJS, any time your data changes, the UI is always brought up to date
* automatically. If friends length changes, or followCount - it always shows what
* `render` describes.
*/
function fuck() {
if killall -9 "$2"; then
echo ; echo " (╯°□°)╯︵$(echo "$2"|toilet -f term -F rotate)"; echo
fi
}
@hdragomir
hdragomir / sm-annotated.html
Last active February 2, 2025 02:22
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
// HTML:
<div class="display-type"></div>
// CSS:
// set the content of an element depending on the media query

Stealing WiFi

/etc/hosts

This will let you access any google owned site. This includes: youtube, google cache, google translate, google search, gmail, google news, etc.

  • Install the HTTPS Everywhere extension
  • Add these rules to your /etc/hosts file
@gggritso
gggritso / console.lol.js
Created October 10, 2014 03:33
console.lol
console.lol = function() {
var harray = [], harrumpf = Math.floor( Math.random() * 10 + 2 );
while ( harrumpf-- ) harray.push( 'ha' );
console.log( harray.join( '' ) + '!' );
}
@ericelliott
ericelliott / essential-javascript-links.md
Last active March 22, 2025 17:28
Essential JavaScript Links
@brenna
brenna / anon-function.sublime-snippet
Last active August 29, 2015 14:17
Sublime Text snippet - JS anonymous function
<snippet>
<content><![CDATA[
function(){
${1}
}
]]></content>
<tabTrigger>fn</tabTrigger>
<scope>source.js</scope>
</snippet>
@makenai
makenai / gist:8fa425316db85e8c73e2
Created April 30, 2015 18:26
Incremental JSHint and LintSpaces checking
var JAVASCRIPT_FILES = ['lib/**/*.js', 'routes/**/*.js', 'public/js/**/*.js'];
grunt.initConfig({
jshint: {
options: {
reporter: require('jshint-stylish'),
force: true,
/* https://github.com/gruntjs/grunt-contrib-jshint
http://jshint.com/docs/options/ */
},
@max-mapper
max-mapper / test.js
Last active August 29, 2015 14:24
tape + http local server test scaffolding
// the two testing modules I like
var test = require('tape')
var spawn = require('tape-spawn')
var execspawn = require('npm-execspawn') // can spawn from require() scope, check it out!
// put this in outer scope so we can kill the local server at the end
var server
test('start test server', function (t) {