Skip to content

Instantly share code, notes, and snippets.

View thongtd's full-sized avatar

Thong Tran thongtd

View GitHub Profile
@sandcastle
sandcastle / oracle_guid_helpers.sql
Last active April 29, 2024 08:19
Oracle GUID helper functions for converting between GUID and RAW(16)
set serveroutput on;
declare
raw_guid raw(16);
guid varchar2(64);
begin
raw_guid := guid_to_raw ('88c6a267-65d2-48d6-8da2-6f45e2c22726');
guid := raw_to_guid('67A2C688D265D6488DA26F45E2C22726');
@Mikodes
Mikodes / gist:be9b9ce42e46c3d4ccb6
Created November 26, 2014 10:30
All Media queries for resolutions
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}
@jiggzson
jiggzson / scientificToDecimal.js
Last active August 22, 2024 05:03
Converts a javascript number from scientific notation to a decimal string
/**
* Removes the minus sign from the beginning of the string
*
* @param str
* @returns an array with the first item as true if a minus
* was found and the string minus the minus sign.
*/
function stripSign(str) {
// Check if it has a minus sign
let hasMinus = str.charAt(0) === '-';