This file contains 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
public static class HtmlControls_ExtensionMethods | |
{ | |
public static string renderControl(this Control control) | |
{ | |
var stringBuilder = new StringBuilder(); | |
using (var stringWriter = new StringWriter(stringBuilder)) | |
using (var htmlTextWriter = new HtmlTextWriter(stringWriter)) | |
control.RenderControl(htmlTextWriter); | |
return stringBuilder.str(); |
This file contains 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 hide(selector) { $(selector).setAttribute('style','display:none')} | |
function remove(selector) { $(selector).remove()} | |
function remove_class(selector) { $(selector).setAttribute('class','')} | |
function move_left(count) | |
{ | |
var eventObj = document.createEvent("Events"); | |
eventObj.initEvent("keydown", true, true); | |
eventObj.which = 37; // left key | |
for (i=0; i < count ; i++) { |
This file contains 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
#https://bokeh.pydata.org/ | |
#http://bokeh.pydata.org/en/latest/docs/installation.html | |
#https://nbviewer.jupyter.org/github/bokeh/bokeh-notebooks/blob/master/quickstart/quickstart.ipynb | |
!pip install bokeh | |
from bokeh.plotting import figure | |
from bokeh.io import output_notebook, show | |
output_notebook() | |
from numpy import cos, linspace | |
x = linspace(-6, 60, 1200) |
This file contains 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
$('.jira-issues th').css({ 'min-width' : '100px' } ) | |
$('#title-text').height(100) | |
$('.jira-issues th:nth-child(1)').css({'min-width': '700px'}) |
This file contains 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
//descriptions from http://www.lunametrics.com/blog/2011/10/04/utmgif-request-parameters/ | |
var utmwv = "5.3.8"; // Tracking code version | |
var utms = "1"; // Session requests. Updates every time a __utm.gif request is made. Stops incrementing at 500 (max number of GIF requests per session). | |
var utmn = "1797201820"; // Unique ID generated for each GIF request to prevent caching of the GIF image | |
var utmhn = "teammentor-33-ci"; // Host name, which is a URL-encoded string | |
var utmcs = "ISO-8859-1"; // Language encoding for the browser. Some browsers don’t set this, in which case it is set to “-” | |
var utmsr = "1440x852"; // Screen resolution | |
var utmvp = "1440x751"; // Size of Viewing Pane | |
var utmsc = "32-bit"; // Screen color depth | |
var utmul = "en-us"; // Browser language |
This file contains 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
browserSync = require('browser-sync').create(); | |
gulp = require('gulp'); | |
shell = require('gulp-shell'); | |
gulp.task 'build', shell.task(['jekyll build --incremental']) | |
gulp.task 'reload-page', ['build'], -> browserSync.reload() | |
gulp.task 'default' , ['build'],-> |
This file contains 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
download docker | |
install docker (click cancel on the VirtualBox question) | |
on cmd.exe/sh | |
docker-machine create --driver=virtualbox default | |
docker-machine ssh default | |
docker run hello-world | |
docker run -it ubuntu bash | |
docker run -it -p 3000:3000 gogs/gogs |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<RulePack xmlns="xmlns://www.fortifysoftware.com/schema/rules"> | |
<RulePackID>950F4B5A-85D0-4954-97D5-35C3F0285057</RulePackID> | |
<SKU>SKU-C:\Users\dinis\AppData\Local\Fortify\CRE-3.90\rules\custom-rule</SKU> | |
<Name>SimpleVersion-CustomDescriptionRule</Name> | |
<Version>1.0</Version> | |
<Description> | |
Description of RulePack | |
</Description> | |
<Rules version = "3.16"> |
This file contains 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
#!/bin/bash | |
echo | |
echo "Note: run this using . ./set-cert-pwd.sh to set the variable in the host bash (it is expected that the bbc-cert.p12 is in the current path" | |
echo "What is the .p12 password: " | |
read -s pwd | |
export P12_PWD=$pwd | |
echo "The password has been set to the P12_PWD variable" | |
echo |
This file contains 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
cd ~/_tools | |
wget http://mirror.catn.com/pub/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | |
tar xzvf apache-maven-3.3.9-bin.tar.gz | |
echo "export PATH=~/_tools/apache-maven-3.3.9/bin:$PATH" >> ~/.bashrc |