A Pen by Lonely Whale on CodePen.
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
@echo off | |
:::::::::::::::::::::::::::: | |
set "params=Problem_with_elevating_UAC_for_Administrator_Privileges"&if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" | |
fsutil dirty query %systemdrive% >nul 2>&1 && goto :GotPrivileges | |
:: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed | |
If "%1"=="%params%" (echo Elevating UAC for Administrator Privileges failed&echo Right click on the script and select 'Run as administrator'&echo Press any key to exit...&pause>nul 2>&1&exit) | |
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%params%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs"&exit | |
:GotPrivileges | |
:::::::::::::::::::::::::::: | |
color 1F |
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 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 |
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
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 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 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
Finally a tool to activate windows as well as Office at the same time. Download From the 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
$(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 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 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 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; | |
} |