Skip to content

Instantly share code, notes, and snippets.

@iaian
iaian / cloudSettings
Last active June 23, 2020 20:44
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-06-23T20:44:40.755Z","extensionVersion":"v3.4.3"}
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@iaian
iaian / scarletSalon.js
Last active August 29, 2015 14:20
Smooth anchor scroll and hide reveal for services / pricing
$(function() {
// Smooth anchor scroll
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
@iaian
iaian / isWorkday.js
Created May 7, 2015 16:13
isWorkday
function isWorkday() {
var date = new Date,
thisHour = date.getHours();
if (thisHour < 9 || thisHour > 16 ) {
return false;
} else {
return true;
}
}
@iaian
iaian / banks-show-mobile-cart.js
Created April 3, 2015 15:29
banks-show-mobile-cart.js
function showMobileCart() {
var isMobile = $(window).width() < 768 ? true : false,
isNavOpen = $('#mainMenu').hasClass('in');
if (isMobile && !isNavOpen) {
$('.navbar-toggle').click();
setTimeout(function() {
$('#dropDown-cart').click();
}, 400);
}
@iaian
iaian / SassMeister-input.scss
Created December 11, 2014 23:59
SRC Wordpress SASS
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
#footer-main {
h3 {
text-transform: uppercase;
color: #fff;
}
@iaian
iaian / getRandomColor.js
Last active August 29, 2015 14:08
GetRandomColor
function get_random_color() {
var letters = '0123456789ABCDEF'.split(''),
color = '#';
for (var i = 0; i < 6; i++ ) {
color += letters[Math.round(Math.random() * 15)];
}
return color;
}
@iaian
iaian / container.css
Created September 25, 2014 17:02
Container css from bootstrap
.container {
margin-right:auto;
margin-left:auto;
padding-left:15px;
padding-right:15px
}
.container:after, .container:before {
content:" ";
display:table
}
@iaian
iaian / sublime3-pref.json
Last active December 20, 2015 23:29
Sublime text 3 - user prefrences
{
"always_show_minimap_viewport": true,
"auto_complete_commit_on_tab": true,
"auto_complete_with_fields": true,
"color_scheme": "Packages/User/SublimeLinter/solarizedDark-IaianMod (SL).tmTheme",
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
@iaian
iaian / solarizedDark-IaianMod.tmTheme
Created April 1, 2013 17:22
Sublime Text : solarized dark mod ( This makes the selected background color : #FDF6E3 )
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Solarized (dark)</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>