(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import Foundation | |
#if canImport(FoundationNetworking) | |
import FoundationNetworking | |
#endif | |
/// Defines the possible errors | |
public enum URLSessionAsyncErrors: Error { | |
case invalidUrlResponse, missingResponseData | |
} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/usr/bin/perl | |
# The above line may need to be changed to point at your version of Perl | |
# | |
# This script attempts to find malicious files/scripts on your machine. | |
# It specifically looks for spambots that we're aware of, as well | |
# as "suspicious" constructs in various scripting languages. | |
# | |
# Normally it should be run as root. | |
# | |
# By default, findbot.pl scans the directories /tmp, /usr/tmp, /home and |
<script> | |
function notify() { | |
var havePermission = window.webkitNotifications.checkPermission(); | |
if (havePermission == 0) { | |
// 0 is PERMISSION_ALLOWED | |
var notification = window.webkitNotifications.createNotification( | |
'http://i.stack.imgur.com/dmHl0.png', | |
'Chrome notification!', | |
'Here is the notification text' | |
); |
netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP localport=80 | |
@echo ========= SQL Server Ports =================== | |
@echo Enabling SQLServer default instance port 1433 | |
netsh advfirewall firewall add rule name="SQL Server" dir=in action=allow protocol=TCP localport=1433 | |
@echo Enabling Dedicated Admin Connection port 1434 | |
netsh advfirewall firewall add rule name="SQL Admin Connection" dir=in action=allow protocol=TCP localport=1434 | |
@echo Enabling Conventional SQL Server Service Broker port 4022 | |
netsh advfirewall firewall add rule name="SQL Service Broker" dir=in action=allow protocol=TCP localport=4022 | |
@echo Enabling Transact SQL/RPC port 135 |
/** POLYFILL FOR IE PLACEHOLDER **/ | |
$(document).ready(function(){ | |
if(!('placeholder' in document.createElement('input'))){ | |
$('input[placeholder]').each(function(){ | |
if(this.value == ''){ | |
var $el = $(this); | |
$el.bind('click', function(ev){ $(ev.target).unbind('click'); ev.target.value = ''; }); | |
$el.val($el.attr('placeholder')); | |
} | |
}); |