Skip to content

Instantly share code, notes, and snippets.

View biancalpadilla's full-sized avatar

Bianca Padilla biancalpadilla

View GitHub Profile
@biancalpadilla
biancalpadilla / .bash_profile
Created September 25, 2015 15:49 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
# name: fishy-drupal
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function _drush_alias_name
{
"always_show_minimap_viewport": false,
"auto_complete_triggers":
[
{
"characters": "bs3",
"selector": "text.html"
}
],
"bold_folder_labels": true,
[
{ "keys": ["ctrl+shift+."], "command": "erb" },
{ "keys": ["super+v"], "command": "clipboard_manager_paste", "args": { "indent": true } },
]
{
"extensions":
[
"rabl",
"jbuilder",
"podspec",
"rake",
"simplecov",
"thor",
"ruby.rails"
<span style="text-align:center" id="delivery-date"></span>
<script>
if (new Date().getHours() < 13) {
var str = '#{firstDate} - #{secondDate}';
} else {
var str = '#{firstDate} - #{secondDate}';
}
function turnAroundDate(startDate, daysToAdd) {
For the listing pages, go under Design->Edit HTML/CSS->Header.html panel->at the bottom of that file add:
<script>
$(".ProductList li").each(function() {
if ($(".p-price strike", this).length > 0) {
$(this).prepend("<span class='item-sale-label'><img src='image path here' /></span>");
<script>
let data = {
cutoff: 15,
0: {
day: 'Sunday',
before: { shipsBy: 'Tomorrow', arrivesBy: 'Tuesday or Wednesday'},
after: { shipsBy: 'Tomorrow', arrivesBy: 'Tuesday or Wednesday'}
},
1: {
day: 'Monday',
@biancalpadilla
biancalpadilla / csv-splitter.sh
Last active September 28, 2018 15:14
CSV too big? Split it using this script...
#!/bin/bash
# To run, cd into the directory (make sure the file you want to split is named file.csv) type command `sh csv-splitter.sh`
# You can convert any txt file into a csv file by changing the extension to .csv
# Split your csv (or txt) file at a specific line number by chaning the 10000 in line 17 to any value you'd like.
# Look for a file called file.csv
FILE=$(ls -1 | grep file.csv)
NAME=${FILE%%.csv}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" style="background:#f9f9f9!important">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<title>{{subject}}</title>
<style>