Skip to content

Instantly share code, notes, and snippets.

View jcubic's full-sized avatar
🎯
Focusing

Jakub T. Jankiewicz jcubic

🎯
Focusing
View GitHub Profile
@jcubic
jcubic / keybase.md
Created August 15, 2014 07:56
Kebase.io proof

Keybase proof

I hereby claim:

  • I am jcubic on github.
  • I am jcubic (https://keybase.io/jcubic) on keybase.
  • I have a public key whose fingerprint is BC65 3F92 314B 398B 5E1E 0BC7 A58E E6F1 31F8 3013

To claim this, I am signing this object:

@jcubic
jcubic / foo.js
Created March 14, 2014 08:24
indent test file for web-mode
(function() {
// }
function() { //
foo();
bar();
}
baz();
})();
@jcubic
jcubic / dabblet.css
Created January 29, 2014 19:01
CSS3 Pagniation
body {
background: #222;
}
.arrow {
background-color: white;
transform: rotate(45deg);
position: absolute;
top: 50%;
}
.arrow, .arrow:before {
@jcubic
jcubic / init.java
Last active December 30, 2019 15:42
Reflection based JSON-RPC Servlet
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.lang.reflect.*;
import com.thetransactioncompany.jsonrpc2.*;
public class init extends HttpServlet {
public init() {
@jcubic
jcubic / dabblet.css
Last active October 11, 2015 02:57
Center text
.wrapper {
clear: both;
margin: 0 10px;
background: red;
float: left;
width:100%;
}
.wrapper .block {
text-align: left;
width: 25%;
@jcubic
jcubic / README.md
Created September 16, 2012 13:30
Print missing html entities from XML file in DOCTYPE ready to paste format

Description

Command Line that print entities (like & or ") in way that can be paste into <!DOCTYPE if xml file don't define them and parser return error, that entity is not defined. Command check if Entity is not already defined.

@jcubic
jcubic / gist:3729817
Created September 15, 2012 21:17
Restore functions from console
c=console;for(var i in c.__proto__){(function(i){c[i]=function(){c.__proto__[i].apply(c,[].slice.call(arguments));};})(i);}
@jcubic
jcubic / gist:3518347
Created August 29, 2012 20:21
log list of YouTube id and titles from playlist
console.log(Array.prototype.slice.call(document.querySelectorAll('.playlist-landing ol li a')).map(function(a) { return a.getAttribute('href').match(/(v=[^&]+)/)[1] + ' ' + a.innerHTML.match(/(class="title.*?)<\/span>/)[1].replace(/.*>/,''); }).join("\n"))
@jcubic
jcubic / gist:3426536
Created August 22, 2012 15:05
185 bytes bookmarklet that insert javascript file into page
javascript:(function(a,s){s[a]('src',prompt());s[a]('type','text/javascript');document.getElementsByTagName('head')[0].appendChild(s);})('setAttribute',document.createElement('script'))
@jcubic
jcubic / gist:3194755
Created July 28, 2012 20:55
Javascript obfuscation challange
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1Q(1m(1m("1Q(3B(p%3k%3g%1u%3c%3b)%39%1J(c)%1k(c%35%2V\'\'%2U(2T(c%2P)))%1h((c%2L%2K)%2J%2I.2H(c%2G)%2F.2E(36))%S%2D(!\'\'.1w(%1y%2C%1y%2A))%2y(c--)r%1F(c)%Q%2x%1c%Q%W%2v(c)%2t%2s%2r(e)%1k%2p%1F%Q%S%Q%2n%1J()%1k\'%1b%2j%1h\'%S%2i%2g%S%2f(c--)2e(k%1c%Q)p%2d.1w(2c%2b(\'%1b%1x\'%2a(c)%1h\'%1b%1x\'%19\'g\')%1u%1c%Q)%29%28%S(\'1L(13(13(13(%27%24%1l%23%f%J%u%l%A%2%7%0%22%0%n%0%w%0%1p%0%y%0%x%7%4%7%0%1t%0%w%0%16%0%n%0%21%0%20%0%1j%7%4%7%0%x%0%m%0%n%0%1j%7%4%7%0%y%0%M%0%8%j%0%M%0%11%0%n%0%m%0%1Z%0%1E%0%N%0%n%7%4%7%0%O%0%N%0%n%0%m%0%8%F%0%1p%0%n%0%w%0%y%7%4%7%0%x%0%y%0%y%0%s%0%8%z%0%10%0%10%0%T%0%14%0%1O%0%Y%0%14%0%1Y%0%Y%0%14%0%1X%0%14%0%Y%0%14%0%1W%0%1O%0%10%0%48%0%T%7%4%7%0%x%0%y%0%y%0%s%7%4%7%0%