View awesomeCheckboxesAndRadios.css
.regular-checkbox {
display: none;
}
.regular-checkbox + label {
background-color: #fafafa;
border: 1px solid #cacece;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0px -15px 10px -12px rgba(0, 0, 0, 0.05);
padding: 9px;
border-radius: 3px;
View all_coursera_old_courses.txt
pgm
algo
algs4partII
algs4partI
comparch
gametheory
compilers
intrologic
automata
programming1
View nukeSmartQuotes.sh
#!/bin/sh
for F in $(egrep -lr '“|‘|”|’' $1); do
sed -i.smartQuoteBackup 's/“/"/g' $F
sed -i.smartQuoteBackup 's/”/"/g' $F
sed -i.smartQuoteBackup "s/‘/'/g" $F
sed -i.smartQuoteBackup "s/’/'/g" $F
done
View splitTarArchives.sh
#!/bin/sh
tar czf - foo/ | split --bytes=2GB - foo.tar.gz
View ajaj.js
/*jshint esversion:6*/
(() => {
'use strict';
const ajaj = (url, type) => {
type = type || 'get';
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.open(type, url, true);
View cloudPebble__TEMPLATE.js
/**
* Welcome to Pebble.js!
*
* This is where you write your app.
*/
var UI = require('ui');
var Vector2 = require('vector2');
var main = new UI.Card({
View jquery.ajaxCall.js
/**
* Creates an AJAX call using jQuery.load()
* Data is inserted into DOM
*
* @param string sCall Name of the Component
* @param string sExtra Extra params we plan to pass
*/
$.ajaxBox = function(sCall, sExtra)
{
var sParams = getParam('sJsAjax') + '?' + getParam('sGlobalTokenName') + '[ajax]=true&' + getParam('sGlobalTokenName') + '[call]=' + sCall;
View jquery.prettySociable.js
/* ------------------------------------------------------------------------
* prettySociable plugin.
* Version: 1.2.1
* Description: Include this plugin in your webpage and let people
* share your content like never before.
* Website: http://no-margin-for-errors.com/projects/prettySociable/
*
* Thank You:
* Chris Wallace, for the nice icons
* http://www.chris-wallace.com/2009/05/28/free-social-media-icons-socialize/
View foobarStuff.sh
#!/bin/sh
chmod -Rv ug+w,o-w,a+rX-st .
find . -type l -print0 -exec unlink {} \;
## This does not work because rename only
## replaces the first occurrence.
#find . -name "*:*" -exec rename : _-_ '{}' \;
## So we do this instead:
for F in `find . -name "*:*"`; do
NEW_NAME=$(echo -n "$F" | sed 's/:/_-_/g')
View ubuntu-update-and-clean.sh
sudo apt-get update && sudo apt-get dist-upgrade -y && sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove -y