Skip to content

Instantly share code, notes, and snippets.

@codenamezjames
codenamezjames / floatdiv.js
Created June 12, 2014 20:18
add the class "magic-floating-stuff" to any bootstrap column and it will follow your screen when you pass it
$(function(){
var MFS = $('.magic-floating-stuff')
var ogScrollTop = $('body').offset().top,
ogElementOffset = MFS.offset().top,
ogDistance = (ogElementOffset - ogScrollTop);
MFSheight = MFS.outerHeight()
documentHeight = $(document).outerHeight()
$('body').change(function(){
MFSheight = MFS.outerHeight()

Copy current kernel configuration to linux source

cp -vi /boot/config-`uname -r` .config

Decide about new kernel options

make localmodconfig

Compile the kernel

make -j6

Compile kernel modules

sudo make modules_install

Install/Place kernel and libs where they should be

sudo make install

( (R + N) + nR)/(N+1) )
R = rating
N = total number of ratings
nR = new Rating
Data Conscious way of rating

Table Of Content

Ram / Random Access Memory

Ram

Ram also know as "random access memory" is a core part of a computer that acts as quick access short term memory.

@codenamezjames
codenamezjames / accountingfly domain match
Last active August 29, 2015 14:09
this is a regular expression to that matches a certain dot com name or dev name
/https?:\/\/(.*\.)?(accountingfly\.com|af\.dev).*/gi
@codenamezjames
codenamezjames / Uninstall kernals
Created November 21, 2014 05:57
Uninstall all but current kernal
sudo apt-get remove --purge $(dpkg -l 'linux-image-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')

Keybase proof

I hereby claim:

  • I am jamesharrington on github.
  • I am jamesharrington (https://keybase.io/jamesharrington) on keybase.
  • I have a public key whose fingerprint is D642 28A6 3E01 39E4 8448 441E 5D4B 6934 0C6E D425

To claim this, I am signing this object:

@codenamezjames
codenamezjames / googleSheetsDB.js
Last active September 21, 2015 17:42
This snippet is designed to get all sheets of a google sheets workbook and return them in json format using promises.
angular.module('googleSheetsDB',[]).factory('sheetsDB', function($q, $http){
var config= {
doc:'1Ie6BFT2mBGOxtqsqq7KhfPqDVlNazsV-OW1nTXdFCDo',
workbook:`https://spreadsheets.google.com/feeds/worksheets/{doc}/public/full?alt=json`,
sheets:`https://spreadsheets.google.com/feeds/list/{doc}/{sheet}/public/values?alt=json`
};
function _getSheets(){
var def = $q.defer();
$http.get(config.workbook.replace('{doc}', config.doc))
$(document).ready(function () {
var ship_check = "old";
$('#no').click(function () {
$('.shippinginfo').show()
var shipping_Country2 = $("#shippingCountry2").val();
if (shipping_Country2 == 'USA'){
$('#rblShippingMethod_0').val(1).attr('disabled', false);
}