Skip to content

Instantly share code, notes, and snippets.

View skopp's full-sized avatar

Rashaad Essop skopp

View GitHub Profile
@skopp
skopp / hashFunction.js
Created June 8, 2013 03:06
hash function script
var hash = function hashFunction( val ) {
switch( typeof val ) {
case "number":
if( ( val | 0 ) === val ) {
return val & 0x3fffffff;
}
return hashNumber( val );
case "string":
return hashString( val );
case "boolean":
Rails CMS alternatives
======================
Note: project activity was checked on 11/26/09 for most of these projects, and the "last update" field has not been kept up to date since then.
Active projects:
---------------
adva-cms
repo: http://github.com/svenfuchs/adva_cms/
site: http://adva-cms.org/
Last update: 11/24/09
@skopp
skopp / asciidoc.css
Created June 6, 2013 20:28
asciidoc cheat sheet [powerman.name/doc/asciidoc] - see also methods.co.nz/asciidoc/
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
/* Default font. */
body {
font-family: Georgia,serif;
}
/* Title font. */
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
@skopp
skopp / py.haml
Created June 5, 2013 21:44
python raw input in haml
!!!
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/
%title raw_input and input 2.6 vs. 3.0
:css
%body
%p input statements
%p
using the input() and raw_input() functions
@skopp
skopp / README.md
Last active December 18, 2015 03:19
JavaScript vs jQuery: a 1:1 comparison adapted by skopp from various sources, biggest influence - cocecademy. enjoy.

JQuery versus JavaScript

The Document Object Model (DOM)

  • To get the most out of jQuery, it is essential to understand how an HTML document is structured. You have to know how your code is built before you can start changing it.
  • An HTML document has what is called the Document Object Model (DOM). This is the way that JavaScript is able to access and modify the HTML page.
  • The DOM consists of every element on the page, laid out in a heirarchical way that reflects the way that they were laid out in the original file.
  • Relationships between elements are referred to with a vocabulary similar to that of a geneologist. Elements have parents, children, and siblings.
  • jQuery is most useful when used to refer to elements of your HTML page via their DOM attributes.
@skopp
skopp / mysqltuner.pl
Created June 5, 2013 21:40
mysql tuner script
#!/usr/bin/perl -w
# mysqltuner.pl - Version 1.2.0
# High Performance MySQL Tuning Script
# Copyright (C) 2006-2011 Major Hayden - [email protected]
#
# For the latest updates, please visit http://mysqltuner.com/
# Git repository available at http://github.com/rackerhacker/MySQLTuner-perl
#
# This program is free software: you can redistribute it and/or modify
@skopp
skopp / siproxd.conf
Created June 4, 2013 12:37
#proxy zelow.no/svn/fwloppyfw-3.0/scripts/siproxd.conf
#
# /etc/siproxd.conf - siproxd configuration file
#
# !! This is a sample file, adapt it to your needs before using it !!
#
# !! Strings MUST NOT contain spaces !!
#
. /etc/config
. /etc/outside.info
@skopp
skopp / environment.rb
Created June 2, 2013 20:38 — forked from dirk/environment.rb
"Fix for bug in Rails 2.3's vendored BlankSlate." - @dirk
config.gem "toml", :version => "0.0.4"
class BlankSlate
class << self
# Hide the method named +name+ in the BlankSlate class. Don't
# hide +instance_eval+ or any method beginning with "__".
def hide(name)
# CHANGED: if instance_methods.include?(name.to_s) and
if instance_methods.include?(name.to_sym) and
name !~ /^(__|instance_eval)/
@hidden_methods ||= {}

127.0.0.1 localhost

203.208.46.144 webcache.googleusercontent.com 203.208.46.144 chatenabled.mail.google.com 203.208.46.144 mail.google.com 203.208.46.181 sites.google.com 203.208.46.181 groups.google.com 203.208.46.181 talkgadget.google.com 203.208.46.181 picasaweb.google.com 203.208.46.181 lh1.ggpht.com

@skopp
skopp / style.css
Created June 2, 2013 13:41
custom stylesheet Github Dark - for Stylish addon for Frirefox / moz
@-moz-document regexp("^http(s)?://((www|gist|help|status).)?github.*") {
body,#main,.unread_count,.pagehead,#browser table th,.main,.news .alert .body,.profilecols ul.stats li strong,
table.upgrades tr.current td,.definitions,#files .file .data {
background: #222 !important;
color: #ddd !important;
}
#dashboard,.highlight,svg {
width: 100% !important;