This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,12})([\/\w-\.]*)?\??([=\w+&%\s-]?)*$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash script to ssh into an amazon or other remote host. I made this script to have a single shortcut on my desktop to use in order to load a routine that would simplify establishing an ssh pipe to our remote servers, in this snippet 2 servers are used, but as you can see, it can be scaled up easily by adding more options/cases in the code. Happy Coding! | |
# Author: Jorge Morales | |
#UPDATE THESE VARIABLES WHENEVER THERE ARE CHANGES | |
test_server="TEST_SERVER_HOST_ADDRESS" | |
production_server="PRODUCTION_SERVER_HOST_ADDRESS" | |
pathToCertificate="PATH_TO_KEYFILE" | |
echo "Type 1 to connect to Test server." | |
echo "Type 2 to connect to Production server." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import calendar | |
import sys | |
import codecs | |
from datetime import datetime, timedelta | |
sys.stdout = codecs.getwriter("utf-8")(sys.stdout, 'strict') | |
_tokens = ["TOKEN_LIST"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
archivo='.env' | |
filelines=`cat $archivo` | |
i=0 | |
newfilelines='' | |
echo "Fetching dirty tags from remote repository..." | |
gitVersion=`git ls-remote -t {{REPOSITORY-URL}} *.*.*^*` | |
gv='' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="map embed-container"> | |
<div id="map-notice" style="display: block;"> {Tell your users what to do!} </div> | |
<div class="map-overlay" style="display: block;"></div> | |
<iframe style="width:100%" src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d3785.684302567802!2d-66.15578327375803!3d18.40721382009222!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x8c036a35d02b013f%3A0x5962cad95b9ec7f8!2sPlaza+Del+Sol!5e0!3m2!1sen!2spr!4v1415284687548" width="633" height="461" frameborder="0"></iframe> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*-------------------------------------------------------+ | |
| PHP-Fusion Content Management System | |
| Copyright (C) PHP-Fusion Inc | |
| https://www.php-fusion.co.uk/ | |
+--------------------------------------------------------+ | |
| Filename: UserDataHelper.php | |
| Author: Jorge Morales (Elvenelf / EffectiX.Net) | |
+--------------------------------------------------------+ | |
| This program is released as free software under the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class videoData{ | |
static $videoId = ''; | |
static $videoData = array(); | |
static private $apiKey = '[YOUR_API_KEY_HERE]'; | |
static $url = 'https://www.googleapis.com/youtube/v3/videos?id=@@VIDEOID@@&part=snippet,player&key=@@APIKEY@@'; | |
static $lastURL = ''; | |
static function getIdFromURL($url){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$yturl = 'http://youtu.be/0f4qZkd4npM'; | |
/* | |
other possible urls... | |
youtube.com/v/vidid | |
youtube.com/vi/vidid | |
youtube.com/?v=vidid | |
youtube.com/?vi=vidid | |
youtube.com/watch?v=vidid | |
youtube.com/watch?vi=vidid | |
youtu.be/vidid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
echo '<pre>'; print_r(${1:ARRAY}); echo '</pre>'; | |
]]></content> | |
<description>PHP: Pretty print_r</description> | |
<scope>source.php</scope> | |
<tabTrigger>prnt</tabTrigger> | |
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Sidr | |
* https://github.com/artberri/sidr | |
* | |
* Copyright (c) 2013 Alberto Varela | |
* Licensed under the MIT license. | |
*/ | |
;(function( $ ){ |