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
const axios = require('axios') | |
/* ... */ | |
const params = new URLSearchParams() | |
params.append('name', 'Akexorcist') | |
params.append('age', '28') | |
params.append('position', 'Android Developer') | |
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/') | |
params.append('awesome', true) |
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
... | |
/* Tested with Gradle 6.3 */ | |
tasks.register("depsize") { | |
description = 'Prints dependencies for "default" configuration' | |
doLast() { | |
listConfigurationDependencies(configurations.default) | |
} | |
} |
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
# Compile and install certificates for the Java trust keystore | |
# and main keystore. Let's face it, this is everyone's keystore password. | |
# Note I install java very flatly normally. | |
COPY trust-certs/ /usr/local/share/ca-certificates/ | |
RUN update-ca-certificates && \ | |
ls -1 /usr/local/share/ca-certificates | while read cert; do \ | |
openssl x509 -outform der -in /usr/local/share/ca-certificates/$cert -out $cert.der; \ | |
/java/bin/keytool -import -alias $cert -keystore /java/jre/lib/security/cacerts -trustcacerts -file $cert.der -storepass changeit -noprompt; \ | |
rm $cert.der; \ | |
done |
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
// Fix iOS Audio Context by Blake Kus https://gist.github.com/kus/3f01d60569eeadefe3a1 | |
// MIT license | |
(function() { | |
window.AudioContext = window.AudioContext || window.webkitAudioContext; | |
if (window.AudioContext) { | |
window.audioContext = new window.AudioContext(); | |
} | |
var fixAudioContext = function (e) { | |
if (window.audioContext) { | |
// Create empty buffer |
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
// see: https://github.com/jmesnil/stomp-websocket | |
var client = Stomp.client('ws://...'); | |
client.debug = undefined; | |
var live = Rx.Observable.create(function (observer) { | |
console.log('Connecting...') | |
client.connect(username, password, function(frame) { | |
console.log(frame.toString()); | |
observer.onNext(frame); |
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
/* | |
* Copyright 2017 Patrick Favre-Bulle | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
//function types | |
type mapf func(interface{}) interface{} |
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
<!DOCTYPE html> | |
<meta charset='utf-8'> | |
<head> | |
<title>Cubism + Websockets</title> | |
<script language='javascript' src='d3.min.js'></script> | |
<script language='javascript' src='cubism.v1.js'></script> | |
<script language='javascript'> | |
/* I can never seem to remember: | |
Array.push() appends to the end, and returns the new length |
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
package br.com.triadworks.controller.relatorios.jasper; | |
import java.io.ByteArrayOutputStream; | |
import java.sql.Connection; | |
import java.util.Map; | |
import javax.sql.DataSource; | |
import net.sf.jasperreports.engine.JRException; | |
import net.sf.jasperreports.engine.JRExporter; | |
import net.sf.jasperreports.engine.JRExporterParameter; | |
import net.sf.jasperreports.engine.JasperCompileManager; |
NewerOlder