This file contains hidden or 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
CREATE OR REPLACE FUNCTION CHARINDEX(text, text, integer) RETURNS integer AS $$ SELECT CASE WHEN strpos(substr($2, $3+1), $1) = 0 THEN 0 ELSE strpos(substr($2, $3+1), $1) + $3 END; $$ LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT; |
This file contains hidden or 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
bcp [database_name.] schema.{table_name | view_name | "query" {in data_file | out data_file | queryout data_file | format nul} | |
[-a packet_size] | |
[-b batch_size] | |
[-c] | |
[-C { ACP | OEM | RAW | code_page } ] | |
[-d database_name] |
This file contains hidden or 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
# Add the remote, call it "upstream": | |
git remote add upstream https://github.com/whoever/whatever.git | |
# Fetch all the branches of that remote into remote-tracking branches, | |
# such as upstream/master: | |
git fetch upstream | |
# Make sure that you're on your master branch: |
This file contains hidden or 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 dyn_notice() { | |
var percent = 0; | |
var notice = $.pnotify({ | |
title: "Please Wait", | |
type: 'info', | |
icon: 'picon picon-throbber', | |
hide: false, | |
closer: false, | |
sticker: false, | |
opacity: .75, |
This file contains hidden or 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
#!/usr/bin/env python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
This file contains hidden or 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
jQuery("#imageID").attr('src','http://localhost:8080/images/1/myImage.png' ); |
This file contains hidden or 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
## set local branch to track remote | |
## using `dev` branch as an example | |
git branch --set-upstream-to=origin/dev dev | |
## abort conflicted merge | |
git merge --abort | |
## removes trailing whitespace, collapses newlines |
This file contains hidden or 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
from Spotfire.Dxp.Application.Visuals import HtmlTextArea | |
vis.As[HtmlTextArea]().HtmlContent += " " |
This file contains hidden or 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
// add a scripts to head | |
$.getScript("https://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js", function () { | |
alert("your resource is ready!") | |
}) |