Skip to content

Instantly share code, notes, and snippets.

View seanbuscay's full-sized avatar

Sean Buscay seanbuscay

View GitHub Profile
seanbuscay / remove file
Created May 16, 2013 15:54
Shell commands to remove Files #shell
rm command syntax
rm (short for remove) is a Unix / Linux command which is used to delete files from a filesystem. Usually, on most filesystems, deleting a file requires write permission on the parent directory (and execute permission, in order to enter the directory in the first place). The syntax is as follows:
rm -f -r {file-name}
-f: Forcefully remove file
-r: Remove the contents of directories recursively
seanbuscay / Selenium_find_font_weight
Created June 10, 2013 00:20
Selenium find font weight.
Command: assertEval
Target: var x = window.document.querySelector(' ul'); window.getComputedStyle(x,null).getPropertyValue('font-weight');
Value: 700
seanbuscay / strip_classes.php
Created September 23, 2013 16:16
function to remove classes on tags. Note will fail if body tag has a class in it. See:
$html=preg_replace('/class=".*?"/', '', $html);
 * @strip a single HTML/XML tag from a string
 * @param array $tags The tags to strip
 * @param string The string to strip from
seanbuscay /
Created October 8, 2013 18:29
cleanup remote branches list. the dry run shows you what it will do. withouth the flag it will run the clean up.
git remote prune origin --dry-run
seanbuscay /
Created July 29, 2013 15:05
Check if file existsd
if [ -f $FILE ];
echo "File $FILE exists"
echo "File $FILE does not exists"
; Create a Tar of All in Directory
tar cvf backup.tar . 
; Untar
 tar xvf filename.tar
; Exclude files
seanbuscay / vue.html
Created February 25, 2017 19:26
How to use Vue Moment
<div id="app">
<li v-for="item in items">
<p>{{ moment(item).format('MMMM Do YYYY, h:mm:ss a') }}</p>
<p class="method">{{ date(item) }}</p>
<p class="filter">{{ item | moment }}</p>
seanbuscay / non-stick-footer.js
Last active September 7, 2018 17:55
A js option to push a web page footer to the bottom of the page, but not have it act as a sticky footer.
{% spaceless %}{{ content.field_story_program_name|render|trim }}{% endspaceless %}