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
| /* | |
| @fliptopbox | |
| LZW Compression/Decompression for Strings | |
| Implementation of LZW algorithms from: | |
| http://rosettacode.org/wiki/LZW_compression#JavaScript | |
| Usage: | |
| var a = 'a very very long string to be squashed'; | |
| var b = a.compress(); // 'a veryāăąlong striċ to bečquashed' |
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
| // Place your settings in this file to overwrite the default settings | |
| { | |
| "workbench.colorTheme": "Visual Studio Dark", | |
| "files.associations": { | |
| "*.json.txt": "json" | |
| }, | |
| "files.exclude": { | |
| "*/**/**.meta": true, | |
| "*/**/_**.*": true | |
| //"*/**/**.meta": true, |
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
| <script src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script><html> | |
| <!-- | |
| Created using jsbin.com | |
| Source can be edited via http://jsbin.com/pdfjs-helloworld-v2/8598/edit | |
| --> | |
| <body> | |
| <canvas id="the-canvas" style="border:1px solid black"></canvas> | |
| <input id='pdf' type='file'/> | |
| <!-- Use latest PDF.js build from Github --> |
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 | |
| git submodule add git@bitbucket.org:drawcode/lib-vr-base.git unity-game/Assets/_app/code/libs/lib-vr-base | |
| git submodule init unity-game/Assets/_app/code/libs/lib-vr-base | |
| git submodule update unity-game/Assets/_app/code/libs/lib-vr-base | |
| ### REMOVE | |
| git submodule deinit -f unity-game/Assets/_app/code/libs/lib-vr-base | |
| rm -rf .git/modules/unity-game/Assets/_app/code/libs/lib-vr-base |
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
| var fileUpload = $(".files-upload").get(0); | |
| var files = fileUpload.files; | |
| var data = new FormData(); | |
| for (var i = 0; i < files.length ; i++) { | |
| data.append(files[i].name, files[i]); | |
| } | |
| data.append("test", "1"); | |
| $.ajax({ | |
| type: "POST", | |
| url: "/api/v1/files/", |
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
| If there is still issue around access after creating SSH and adding it in your Bitbucket account or wherever, you need to do the below on GitBash, OSX or Linux: | |
| ssh-add -l | |
| Then, if you don't see your key listed, add it with: | |
| ssh-add ~/.ssh/identity | |
| This worked for me. | |
| ssh-add ~/.ssh/id_rsa |
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
| public static void Email(Context context, string emailTo, string emailCC, string subject, string emailText, List<string> filePaths) | |
| { | |
| var email = new Intent(Intent.ActionSendMultiple); | |
| email.SetType("text/plain"); | |
| email.PutExtra(Intent.ExtraEmail, new string[]{emailTo}); | |
| email.PutExtra(Intent.ExtraCc, new string[]{emailCC}); | |
| var uris = new List<IParcelable>(); | |
| filePaths.ForEach(file=> { |
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
| Code (CSharp): | |
| // Somewhere at line 3345 in method GenerateColorToTargets() | |
| else if(GetComponent<CanvasRenderer>()) | |
| { | |
| colors = new Color[1,3]; | |
| colors[0,0] = colors[0,1] = GetComponent<CanvasRenderer>().GetColor(); | |
| } | |
| Code (CSharp): |
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
| // Implements multipart/form-data POST in C# http://www.ietf.org/rfc/rfc2388.txt | |
| // http://www.briangrinstead.com/blog/multipart-form-post-in-c | |
| public static class FormUpload | |
| { | |
| private static readonly Encoding encoding = Encoding.UTF8; | |
| public static HttpWebResponse MultipartFormDataPost(string postUrl, string userAgent, Dictionary<string, object> postParameters) | |
| { | |
| string formDataBoundary = String.Format("----------{0:N}", Guid.NewGuid()); | |
| string contentType = "multipart/form-data; boundary=" + formDataBoundary; |
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
| javascript:(function(){function%20R(w){try{var%20d=w.document,j,i,t,T,N,b,r=1,C;for(j=0;t=["object","embed","applet","iframe"][j];++j){T=d.getElementsByTagName(t);for(i=T.length-1;(i+1)&&(N=T[i]);--i)if(j!=3||!R((C=N.contentWindow)?C:N.contentDocument.defaultView)){b=d.createElement("div");b.style.width=N.width;%20b.style.height=N.height;b.innerHTML="<del>"+(j==3?"third-party%20"+t:t)+"</del>";N.parentNode.replaceChild(b,N);}}}catch(E){r=0}return%20r}R(self);var%20i,x;for(i=0;x=frames[i];++i)R(x)})();%20javascript:(function(){var%20newSS,%20styles='*%20{%20background:%20white%20!%20important;%20color:%20black%20!important%20}%20:link,%20:link%20*%20{%20color:%20#0000EE%20!important%20}%20:visited,%20:visited%20*%20{%20color:%20#551A8B%20!important%20}';%20if(document.createStyleSheet)%20{%20document.createStyleSheet("javascript:'"+styles+"'");%20}%20else%20{%20newSS=document.createElement('link');%20newSS.rel='stylesheet';%20newSS.href='data:text/css,'+escape(styles);%20document.getElementsByTagName("head")[0 |