This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dpkg --list | grep linux-image | cut -d " " -f 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Product2 product = new Product2(); | |
product.Name = 'Product Example'; | |
product.RecordTypeId = '<Product record type id>'; | |
product.Family = null; | |
product.IsActive = true; | |
insert product; | |
PricebookEntry pricebookEntry = new PricebookEntry(); | |
pricebookEntry.Pricebook2Id = Test.getStandardPriceBookId(); | |
pricebookEntry.Product2Id = product.Id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//finding all attributes of an element. | |
$(this).each(function() { | |
$.each(this.attributes, function() { | |
// this.attributes is not a plain object, but an array | |
// of attribute nodes, which contain both the name and value | |
if(this.specified) { | |
console.log(this.name, this.value); | |
} | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers | |
* @author ShirtlessKirk. Copyright (c) 2012. | |
* @license WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
var luhnChk = (function (arr) { | |
return function (ccNum) { | |
var | |
len = ccNum.length, | |
bit = 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#nationalPicker').datepick({ | |
onDate: nationalDays, showTrigger: '#calImg'}); | |
var natDays = [[1, 26, 'au', 'Australia'], [2, 6, 'nz', 'New Zealand'], | |
[3, 17, 'ie', 'Ireland'], [4, 27, 'za', 'South Africa'], | |
[5, 25, 'ar', 'Argentina'], [6, 6, 'se', 'Sweden'], | |
[7, 4, 'us', 'United States'], [8, 17, 'id', 'Indonesia'], | |
[9, 7, 'br', 'Brazil'], [10, 1, 'cn', 'China'], | |
[11, 22, 'lb', 'Lebanon'], [12, 12, 'ke', 'Kenya']]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
jQuery script for showing entries without a version from a SFDC package Table | |
Use with: https://chrome.google.com/webstore/detail/jquery-shell/cbbihnlpjnikhccblfddkbddcggagbci | |
*/ | |
$('table[id$="packageComponentTable"] td:nth-child(7)').each(function() { | |
if ($(this).is(':empty') == false) { | |
$(this).closest('tr').remove(); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//get all objects | |
Map<String, Schema.SObjectType> objects = Schema.getGlobalDescribe(); | |
Schema.DescribeSObjectResult objInfo = null; | |
for (Schema.SObjectType obj : objects.values()) { | |
objInfo = obj.getDescribe(); | |
System.debug(objInfo.getName() + ' [' + objInfo.getLabel() + ']'); | |
} | |
//get all fields for account object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
/*Popup message boxes css*/ | |
/*Message boxes*/ | |
.message-box{ | |
position: fixed; | |
top:2%; | |
left: 40%; | |
/*width: 40%;*/ | |
border: 1px solid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This game is for Unix only. | |
It is a simple yet easily navigable Tic-Tac-Toe game for the Unix terminal. To run this file, go | |
to your awesome Unix terminal and (after you have downloaded this text file, of course) and | |
navigate to this file. Then, compile and link the program with your handy compiler which will | |
almost definitely be installed unless you have removed it using the command 'gcc TicTacToe.c'. | |
This creates an executeable. To run it, you can simply type './a.out'. If you want to have a more | |
memorable file and/or prevent conflicts, simply change the name with the 'mv' tool | |
('mv a.out TicTacToe') or use the '-o' ("output file") when compiling |