A Pen by Lonely Whale on CodePen.
This file contains hidden or 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
| function difference(object, base) { | |
| function changes(object, base) { | |
| return _.transform(object, function (result, value, key) { | |
| if (!_.isEqual(value, base[key])) { | |
| result[key] = | |
| _.isObject(value) && _.isObject(base[key]) | |
| ? changes(value, base[key]) | |
| : value; | |
| } |
This file contains hidden or 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 | |
| use setasign\Fpdi\Fpdi; | |
| require_once('vendor/setasign/fpdf/fpdf.php'); | |
| require_once('vendor/autoload.php'); | |
| global $pdf; | |
| if (1) { |
This file contains hidden or 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
| var RTCPeerConnection = window.webkitRTCPeerConnection || window.mozRTCPeerConnection; | |
| if (RTCPeerConnection) (function () { | |
| var rtc = new RTCPeerConnection({iceServers:[]}); | |
| if (1 || window.mozRTCPeerConnection) { // FF [and now Chrome!] needs a channel/stream to proceed | |
| rtc.createDataChannel('', {reliable:false}); | |
| } | |
| rtc.onicecandidate = function (evt) { | |
| if (evt.candidate) grepSDP("a="+evt.candidate.candidate); | |
| }; |
This file contains hidden or 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
| $(document).ready(function () { | |
| var xmlhttp = new XMLHttpRequest(); | |
| var url = "http://ipecho.net/plain"; | |
| xmlhttp.onreadystatechange = function () { | |
| if (this.readyState == 4 && this.status == 200) { | |
| IP = this.responseText; | |
| // IP variable stores the PUBLIC IP address of the system | |
| //for eg 110.44.116.42 | |
| } |
This file contains hidden or 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
| Sub InsertAllSlides() | |
| ' Insert all slides from all presentations in the same folder as this one | |
| ' INTO this one; do not attempt to insert THIS file into itself, though. | |
| Dim vArray() As String | |
| Dim x As Long | |
| ' Change "*.PPT" to "*.PPTX" or whatever if necessary: | |
| EnumerateFiles ActivePresentation.Path & "\", "*.PPTX", vArray |
This file contains hidden or 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
| Sub RenameFiles() | |
| 'Updateby20141124 | |
| Dim xDir As String | |
| Dim xFile As String | |
| Dim xRow As Long | |
| With Application.FileDialog(msoFileDialogFolderPicker) | |
| .AllowMultiSelect = False | |
| If .Show = -1 Then | |
| xDir = .SelectedItems(1) | |
| xFile = Dir(xDir & Application.PathSeparator & "*") |
This file contains hidden or 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 require 'class/class.phpmailer.php'; | |
| if (isset($_POST["submit"])) { | |
| $name = $_POST['name']; | |
| $bodyContent = "hello ".$name; | |
| $mail = new PHPMailer; | |
| $mail->CharSet = "UTF-8"; | |
| $mail->IsSMTP(); //Sets Mailer to send message using SMTP |