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
| <NotepadPlus> | |
| <UserLang name="LogFile" ext="log"> | |
| <Settings> | |
| <Global caseIgnored="yes" /> | |
| <TreatAsSymbol comment="no" commentLine="no" /> | |
| <Prefix words1="no" words2="no" words3="no" words4="no" /> | |
| </Settings> | |
| <KeywordLists> | |
| <Keywords name="Delimiters">[(0])0</Keywords> | |
| <Keywords name="Folder+"></Keywords> |
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
| const CrossOriginLocalStorage = function(currentWindow, iframe, allowedOrigins, onMessage) { | |
| this.allowedOrigins = allowedOrigins; | |
| let childWindow; | |
| // some browser (don't remember which one) throw exception when you try to access | |
| // contentWindow for the first time, it works when you do that second time | |
| try { | |
| childWindow = iframe.contentWindow; | |
| } catch(e) { | |
| childWindow = iframe.contentWindow; |
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
| #!/bin/bash | |
| # A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
| # Used to provide DDNS service for my home | |
| # Needs the DNS record pre-creating on Cloudflare | |
| # Proxy - uncomment and provide details if using a proxy | |
| #export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
| # Cloudflare zone is the zone which holds the record |
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
| 1, create a virtual machine from the virtualbox with VDI harddisk | |
| 2, add a virtual CDROM to the virtual machine and select boot2docker.iso ( the boot2docker.iso should be downloaded before) | |
| 3, start the virtual machine | |
| 4, write the boot2docker.iso image to the virtual harddisk using dd command | |
| # dd if=/dev/cdrom of=/dev/sda |
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 ubuntu | |
| RUN apt update \ | |
| && apt install -y firefox \ | |
| openssh-server \ | |
| xauth \ | |
| && mkdir /var/run/sshd \ | |
| && mkdir /root/.ssh \ | |
| && chmod 700 /root/.ssh \ | |
| && ssh-keygen -A \ | |
| && sed -i "s/^.*PasswordAuthentication.*$/PasswordAuthentication no/" /etc/ssh/sshd_config \ |
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
| void Main() | |
| { | |
| var searchWord = "TextToSearchFor"; | |
| var searchPattern = "*.js"; | |
| var sourceFolder = @"C:\_Dev\TFS\MyProject\Source\"; | |
| var defaultProgram = @"C:\Program Files (x86)\Notepad++\notepad++.exe"; | |
| List<string> allFiles = new List<string>(); | |
| var fileCount = 0; |