Skip to content

Instantly share code, notes, and snippets.

View krabello's full-sized avatar

Kevin Rabello krabello

  • Stetson University
  • DeLand, Florida
View GitHub Profile
<div class=searchBox><img onclick=moduleSearch('<?php catalog();?>'); src=images/026cc599.search_icon.png alt=Search><input id="filter_keyword" placeholder=Keyword/Item#></div>
<script>
<!--
$('#filter_keyword').keydown(function(e) {
@facelordgists
facelordgists / Optimize-nginx.md
Last active November 21, 2016 12:01
SERVER: nginx & apache - Enable Gzip & future headers + disable etags
@krabello
krabello / convert-audio-to-video.sh
Created May 19, 2017 18:46
Converts a Audio file and image to video. In order to be used on youtube
#!/bin/sh
# example line
# 372|"Baby Beluga CD"|Raffi8054BabyBeluga.mp3|http://www.domain.com/img/data/ETA_CD56.jpg
while IFS='|' read field1 field2 field3 field4 || [[ -n "$line" ]]; do
f=$(echo $field2 | tr -d '"' | tr -d ' ' | tr -d '®' | tr -d "'" | tr -d '‘' | tr -d '’' | tr -d '&' | tr -d ',' | tr -d '-')
ffmpeg -loop 1 -i $field4 -i $field3 -c:v libx264 -c:a aac -strict experimental -b:a 192k -shortest ./out/$f.mp4 < /dev/null
done < "$1"
@ravanscafi
ravanscafi / _readme.md
Last active June 22, 2019 14:42
Proper way to use LiveReload with Laravel Elixir

Proper way to use LiveReload with Laravel Elixir

Features

  • It works without touching laravel-elixir source files, so it will not break on updates.
  • It runs only on watch task, so that when you run other tasks, livereload will not start and hang the console.
  • It performs soft-reloads on CSS changes, instead of a full page reload.

Instructions

  1. npm install gulp-livereload if you still don't have it.
  2. Create an elixir.json file on the root of your project (where your gulpfile.js is located)
@ahmadawais
ahmadawais / Flat-Social-Icons-(pure-CSS).markdown
Created November 29, 2014 04:30
Flat Social Icons (pure CSS)

Flat Social Icons (pure CSS)

Pure CSS social icons (no images), written in SCSS and uses the BEM Methodology for the naming conventions in the HTML and CSS.

14/10/14; Updated to add hover states.

15/10/14; Updated how the buttons vertically center the icon.

20/10/14; Modified the code so only one list and loop is needed.

@krabello
krabello / session.php
Created November 10, 2021 18:09
Session Start
<?php
if (session_status() == PHP_SESSION_NONE) {
// Prevents javascript XSS attacks aimed to steal the session ID
ini_set('session.cookie_httponly', '1');
// ** PREVENTING SESSION FIXATION **
// Session ID cannot be passed through URLs
ini_set('session.use_only_cookies', '1');
@alexstone
alexstone / slack_notification.php
Created March 3, 2014 06:54
Fire a Slack Notification via CURL
<?php
// (string) $message - message to be passed to Slack
// (string) $room - room in which to write the message, too
// (string) $icon - You can set up custom emoji icons to use with each message
public static function slack($message, $room = "engineering", $icon = ":longbox:") {
$room = ($room) ? $room : "engineering";
$data = "payload=" . json_encode(array(
"channel" => "#{$room}",
"text" => $message,
@lcobucci
lcobucci / .bashrc
Last active February 15, 2023 11:45
My dot files
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
if [ -f /usr/share/git-core/contrib/completion/git-prompt.sh ]; then
source /usr/share/git-core/contrib/completion/git-prompt.sh
fi
@JeffreyWay
JeffreyWay / countries.php
Created July 23, 2015 17:01
Country Names + Codes
[
"United States" => "us",
"Afghanistan" => "af",
"Albania" => "al",
"Algeria" => "dz",
"American Samoa" => "as",
"Andorra" => "ad",
"Angola" => "ad",
"Anguilla" => "ai",
"Antarctica" => "aq",
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->