Skip to content

Instantly share code, notes, and snippets.

@SteffenL
SteffenL / KeyboardHelper.swift
Last active November 18, 2018 23:05
Reusable keyboard helper class for iOS and Swift to help prevent the virtual keyboard from overlapping and hiding UI elements by adjusting the bottom layout constraint.
//
// KeyboardHelper.swift
//
// Copyright 2018 Steffen André Langnes
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
04698c4dc8d63377c2e6f9fadadf4622f77f6ad4672d046313f2f348096f3af7edc8db9ea2c1b89bb1feb3077b78bbd297e450d3110df880e03652861f41a50847
@SteffenL
SteffenL / checkForBadJavascripts.js
Created September 28, 2015 13:39 — forked from BrockA/checkForBadJavascripts.js
This is a utility function, meant to be used inside a Greasemonkey script that has the "@run-at document-start" directive set. It Checks for and deletes or replaces specific <script> tags.
/*--- checkForBadJavascripts()
This is a utility function, meant to be used inside a Greasemonkey script that
has the "@run-at document-start" directive set.
It Checks for and deletes or replaces specific <script> tags.
*/
function checkForBadJavascripts (controlArray) {
/*--- Note that this is a self-initializing function. The controlArray
parameter is only active for the FIRST call. After that, it is an
event listener.
@SteffenL
SteffenL / edi-savedata-dump-2.txt
Created November 28, 2014 17:05
Escape Dead Island save-data dump 2 (a bit further into the game)
Begin nested node. Level = 1
double = 30.000000
string = version
Begin nested node. Level = 2
Begin nested node. Level = 3
Begin nested node. Level = 4
double = 1.000000
string = patterns
End nested node. Level = 3
string = armour_attachments
@SteffenL
SteffenL / edi-savedata-dump.txt
Created November 28, 2014 16:50
Escape Dead Island save-data dump
Begin nested node. Level = 1
Begin nested node. Level = 2
Begin nested node. Level = 3
boolean = 0
string = achievement_p003
boolean = 0
string = achievement_e006
double = 0.000000
string = snapshot_collectible_86
double = 0.000000
$OutputEncoding = New-Object -TypeName System.Text.UTF8encoding
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- 20110224 : Ryan Milligan : Created OverrideAppConfigWithTargetPath target to fix ClickOnce deploy bug -->
<!-- 20100827 : João Angelo : Fixed bug when using Publish command within Visual Studio -->
<PropertyGroup>
<!-- Prevent circular dependency on Build target -->
<PipelineDependsOnBuild>false</PipelineDependsOnBuild>
<!-- Override project config file name (By default is set to Web.config) -->
<ProjectConfigFileName>App.Config</ProjectConfigFileName>
</PropertyGroup>
@SteffenL
SteffenL / Riptide collectible items
Last active December 16, 2015 18:19
List of DI: Riptide collectible items
Craftplan_Dev1
Craftplan_Dev2
Craftplan_DevForce
Craftplan_Dev3
Craftplan_Dev4
Craftplan_Shockcraft
Craftplan_Highvoltagecraft
Craftplan_Short-Circuitcraft
Craftplan_Oldsmokycraft
Craftplan_Paralysingcraft
@SteffenL
SteffenL / Riptide inventory items
Created April 26, 2013 12:18
List of DI: Riptide inventory items
AMelee_HeavyWrenchGen
Any_Weapon
ATEST_Machete
FakeItem
Melee_AxeHatchetGen
Melee_AxeSplittingGen
Melee_AxeUniversalGen
Melee_BaseballBat
Melee_BaseballBat_Fake
Melee_BaseballBatBigGen
@SteffenL
SteffenL / build-all.bat
Created April 3, 2013 18:36
Opening a file using the path returned by tmpnam() may result in a "permission denied" error on Windows. This sample helps illustrate the problem. Make sure to open the Visual Studio command prompt before running build-all.bat.
@echo off
echo Locating tools...
where /Q g++
if not %errorlevel% == 0 echo "g++" not found.& goto :eof
where /Q cl
if not %errorlevel% == 0 echo "cl" not found.& goto :eof
where /Q msbuild
if not %errorlevel% == 0 echo "msbuild" not found.& goto :eof