Skip to content

Instantly share code, notes, and snippets.

View ianthekid's full-sized avatar

Ian Ray ianthekid

View GitHub Profile
<?php
/****************************
*
* Lead Source Tracking
*
****************************
* @Author: Ian Ray
* @Created: 17-May 2015
* @Updated: 10-July 2015
* @Description: Created for use with Gravity Forms and Salesforce Lead Source field
@ianthekid
ianthekid / ubuntu-mouse-cursor
Last active September 6, 2015 01:12
ubuntu mouse cursor not showing
sudo modprobe -r psmouse
sudo modprobe psmouse
@ianthekid
ianthekid / Attachment-Image-Comments.php
Last active November 24, 2015 06:25
Wordpress Comments for Attachment Images in Post Loop
<?php
//Place this within The Loop of post_parent ($post)
$args = array( 'post_type' => 'attachment',
'numberposts' => -1,
'post_parent' => $post->ID );
$attachments = new WP_query($args);
while ($attachments->have_posts()) :
setDns domain.com 0.0.0.0
navigate http://domain.com/
@ianthekid
ianthekid / google_play_music_to_spotify_playlist.js
Created September 28, 2018 21:07
Copy playlists from Google Play Music to Spotify
/*
* See instructions on this page: https://community.spotify.com/t5/Desktop-Windows/Import-Google-Music-playlists-to-Spotify/td-p/1173080/page/3
* Then access this site: http://spotlistr.herokuapp.com/#/search/textbox
*/
//Copy/Paste in web browser console on any public playlist page for Google Play Music
function fReplace(thisString, thisThing, thatThing) {
let tLS = thisString;
while(tLS.includes(thisThing)){
tLS = tLS.replace(thisThing, thatThing);
#!/bin/sh
# BACKUP SCRIPT
# DATABASE
DBNAME="dbname"
DBUSER="dbuser"
DBPASS="dbpass"
# PATHS
DIRDB="/backup/db"
<?php
function sendToSlack($lead, $sfdcId, $channel) {
$slack = [
"text" => '',
"username" => $lead['firstName']." ".$lead['lastName'],
"icon_emoji" => ':fire:',
"attachments" => [[
"color" => '#FA9100',
"title" => 'Open in Salesforce »',
"title_link" => "https://salesforce.com/r/Lead/".$sfdcId."/view",
@ianthekid
ianthekid / hexagon-image.css
Created May 29, 2021 16:05
hexagon-image.css
img {
clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}