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
require 'java' | |
require 'itext' | |
java_import com.lowagie.text.Document | |
java_import com.lowagie.text.PageSize | |
java_import com.lowagie.text.pdf.PdfPCell | |
java_import com.lowagie.text.pdf.PdfPTable | |
java_import com.lowagie.text.pdf.PdfWriter | |
java_import java.lang.String | |
java_import java.io.FileOutputStream |
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
hook = java.lang.Thread.new do | |
# puts '[DEBUG] shutdown hook' | |
# java.lang.Thread.get_all_stack_traces.key_set.each do | thread | | |
# puts '[DEBUG] stopping' | |
# begin | |
# thread.stop | |
# rescue java.lang.Throwable => t | |
# puts t | |
# end |
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
SELECT 'REVOKE ' | |
|| privilege | |
|| ' ON "' | |
|| table_name | |
|| '" TO ' | |
|| grantee | |
|| CASE | |
WHEN grantable = 'YES' | |
THEN ' WITH GRANT OPTION;' | |
ELSE ';' |
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
(defproject lein1 "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.7.0"] | |
[compojure "1.5.0"] | |
[ring "1.4.0"] | |
[com.h2database/h2 "1.4.187"] | |
[org.clojure/java.jdbc "0.6.1"] |
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
import play.api.libs.json.Json | |
import play.api.libs.ws.ning.NingWSClient | |
import scala.concurrent.ExecutionContext.Implicits.global | |
/** | |
* Created by ball on 9/16/16. | |
*/ | |
object InventoryFetcher { |
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
### Keybase proof | |
I hereby claim: | |
* I am informz on github. | |
* I am s_ball (https://keybase.io/s_ball) on keybase. | |
* I have a public key ASB9Bxh_zrIvBszbDzDob4OBelPsL-ukJv9vgdugYnWq_go | |
To claim this, I am signing this object: |
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
insert API request: | |
[ | |
{ | |
"entity" : "ssp_ratecard", | |
"attribute" : "calendar_period_id", | |
"bigint_value" : 34567, | |
"text_value" : null, | |
"double_value" : null, | |
"boolean_value" : null |
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
declare | |
l_url varchar2(100) := 'http://datamaker-stage.aoa.inbcu.com/data-maker/health'; | |
l_req utl_http.req; | |
l_result utl_http.resp; | |
l_data varchar2(4000); | |
l_clob clob; | |
begin | |
dbms_lob.createtemporary(l_clob,true); | |
l_req := utl_http.begin_request(l_url); | |
l_result := utl_http.get_response(l_req); |
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
curl http://spark-cluster-ip:6066/v1/submissions/status/driver-20151008145126-0000 |
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
import org.scalatest.Matchers._ | |
import org.scalatest.FlatSpec | |
/* | |
Implement the mean, median, mode and range methods in Java 8 Functional style with the minimum code necessary to pass the tests. | |
*/ | |
class FunctionalTestSpec extends FlatSpec { | |
"A Range " should "have a value of 14" in { | |
assert(14 === range(3, 17, 15, 11, 9)) | |
} | |
// range: the difference between min and max values |
OlderNewer