Skip to content

Instantly share code, notes, and snippets.

@zeqk
zeqk / user.js
Created January 2, 2018 16:05 — forked from EtienneR/user.js
XMLHttpRequest RESTful (GET, POST, PUT, DELETE)
// Get all users
var url = "http://localhost:8080/api/v1/users";
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.onload = function () {
var users = JSON.parse(xhr.responseText);
if (xhr.readyState == 4 && xhr.status == "200") {
console.table(users);
} else {
console.error(users);
public interface IFoo {}
public abstract class MyClass<T>
where T : class, IFoo
{
}
class Base { }
class Test<T, U>
where U : struct
@zeqk
zeqk / apple_cert_openssl.cmd
Created October 26, 2017 17:59
apple certificate openssl
openssl x509 -inform DER -outform PEM -in ios_development.cer -out ios_development.cer.pem
openssl pkcs12 -export -inkey keyname.key -in ios_development.cer.pem -out Certificates.p12
inAppBrowser
http://ngcordova.com/docs/plugins/inAppBrowser/
Force download our open file Pdf:
var options = {
location: 'yes',
clearcache: 'yes'
};
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
@zeqk
zeqk / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console