Skip to content

Instantly share code, notes, and snippets.

@dethbiscuit
dethbiscuit / Swift and Soap Web Service
Created January 21, 2015 12:58
Swift and Soap Web Service
//
// Call a soap web service
//
// Add
// NSURLConnectionDelegate
// NSXMLParserDelegate
class MapViewController: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate, NSURLConnectionDelegate, NSXMLParserDelegate{
@IBOutlet weak var mapKit: MKMapView!
var wsUrl : String = "http://mobilewebservice.greenmotion.ch/MobileEvpass.asmx"
@dethbiscuit
dethbiscuit / getAllUrlParams.js
Last active July 5, 2018 05:34
[JS] Get all URL params
function getAllUrlParams(url) {
// get query string from url (optional) or window
var queryString = url ? url.split('?')[1] : window.location.search.slice(1);
// we'll store the parameters here
var obj = {};
// if query string exists
if (queryString) {
@dethbiscuit
dethbiscuit / base_email_template.html
Created July 5, 2018 05:39
Responsive base e-mail template
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Simple Transactional Email</title>
<style>
/* -------------------------------------
INLINED WITH htmlemail.io/inline
------------------------------------- */
@dethbiscuit
dethbiscuit / txtbox_numbers_only .js
Created July 5, 2018 05:46
[jQuery] txtbox numbers only
$(document).ready(function () {
$("#quantity").keypress(function (e) {
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
$("#errmsg").html("Digits Only").show().fadeOut("slow");
return false;
}
});
});
@dethbiscuit
dethbiscuit / layout.css
Created July 5, 2018 05:49
Website basic layout
body{
background-color:#F2F2F2;
}
div{
margin-left:auto;
margin-right:auto;
width:400px;
background-color:transparent;
text-align:center;
@dethbiscuit
dethbiscuit / draggable_div.css
Created July 5, 2018 05:52
[jQuery] Draggable div
#todrag {
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
background: red;
color: white;
position: absolute;
left: 20px;
top: 20px;
@dethbiscuit
dethbiscuit / txtbox_events.html
Created July 5, 2018 05:55
[jQuery] Txtbox events
<input id="txtInput" type="text" />
<br/>
<span id="result"></span>
@dethbiscuit
dethbiscuit / basic_animation.css
Created July 5, 2018 05:56
[CSS] Basic animation
body
{
font-family: sans-serif;
color: #eee;
background-color: #222;
}
a
{
color: #ff9;
@dethbiscuit
dethbiscuit / IIS_Create_Website_Cluster_Nodes.ps1
Created July 31, 2018 07:54
Add a website to IIS on every node in a cluster
<#
.SOURCE
.
.SYNOPSIS
.
.DESCRIPTION
Creates website in IIS (on all nodes in the clcuster) and assign a application pool and create both HTTP and HTTPS bindings.
.PARAMETER WebSiteName
This is the site name you are going to create.
.PARAMETER RootFSFolder
@dethbiscuit
dethbiscuit / card.css
Last active August 6, 2018 07:35
[velocity] dragging animation
body { background-color:#20262E; }
#card {
position: absolute;
width: 250px;
height: 50px;
background: grey;
border-radius: 6px;
cursor: move;
}