Skip to content

Instantly share code, notes, and snippets.

@SteffenL
SteffenL / README.markdown
Created March 22, 2012 01:53 — forked from jrust/README.markdown
Bootstrap's Typeahead plugin extended (AJAX functionality, comma-separated values, autowidth, and autoselect)

This is a fork of a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

  • Ability to disable autoselect of first matched element.
  • Ability to automatically set the width of the dropdown to that of the text input.
  • Ability to fetch source element via AJAX
  • Ability to have a comma separated list of tags.

For the proper source, and other examples, please see the original gist.

Example showing off all the above features

<?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>
$OutputEncoding = New-Object -TypeName System.Text.UTF8encoding
@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 / mod_dds_header.lua
Created January 19, 2021 12:39 — forked from hhrhhr/mod_dds_header.lua
RP6L unpacker. Usage: rp6l.lua <filename.rpack> [output_directory]
assert(_VERSION == "Lua 5.3")
-- DDS header [32]
_fourcc = 1; _size = 2; _flags = 3; _height = 4
_width = 5; _pitch = 6; _depth = 7; _mipmaps = 8
-- reserved [44]
-- 9 10 11 12
-- 13 14 15 16
-- 17 18 19
-- DDSPixelFormat [32]
@SteffenL
SteffenL / patch-edid.md
Created February 17, 2024 08:46 — forked from ejdyksen/patch-edid.md
A script to fix EDID problems on external monitors in macOS

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten