Skip to content

Instantly share code, notes, and snippets.

View bitsnaps's full-sized avatar
🌍
Working @ CorpoSense

Ibrahim H. bitsnaps

🌍
Working @ CorpoSense
View GitHub Profile
@Grab(group = "org.reflections", module = "reflections", version = "0.9.11")
@Grab(group = "org.slf4j", module = "slf4j-simple", version = "1.7.25")
import groovy.json.JsonOutput
import org.codehaus.groovy.reflection.GeneratedMetaMethod
import org.reflections.Reflections
def reflections = new Reflections("org.codehaus.groovy.runtime")
def json = reflections.getSubTypesOf(GeneratedMetaMethod).collect {
[
{
"name": "org.codehaus.groovy.runtime.dgm$0",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true
},
{
"name": "org.codehaus.groovy.runtime.dgm$1",
@drm317
drm317 / gist:3e2a9ce4ba1288c4fbaab1e534d71133
Last active December 4, 2023 21:42
OpenJDK 11+ on MacOS X

OpenJDK 11+ on MacOS X

Manually downloading, extracting and configuring the installation of OpenJDK 11+ is a high-maintenance exercise. Particularly if you need to install and switch between multiple versions of the JDK.

The following options for installing OpenJDK 11+ and switching between versions make the job easier..

Install with Jabba

Jabba is a Java version manager inspired by nvm (Node.js) written in Go.

@innopreneur
innopreneur / BigchainDBJavaDriverUsageExample.java
Last active February 23, 2022 07:54
Sample usage of BigchainDB Java Driver for CREATE and TRANSFER transactions
import java.io.IOException;
import java.security.KeyPair;
import java.util.Map;
import java.util.TreeMap;
import com.bigchaindb.builders.BigchainDbConfigBuilder;
import com.bigchaindb.builders.BigchainDbTransactionBuilder;
import com.bigchaindb.constants.Operations;
import com.bigchaindb.model.FulFill;
@gatopeich
gatopeich / install_Jupyter.sh
Last active March 29, 2024 22:10
Install Jupyter iPython Notebook on Android via Termux
pkg upgrade
# Install runtime deps
pkg install python libzmq libcrypt
# Add build deps
pkg install python-dev libzmq-dev libcrypt-dev clang
pip3 install -U pip
pip3 install pyzmq --install-option="--zmq=/usr/lib"
pip3 install jupyter
@bricksroo
bricksroo / App.vue
Last active February 7, 2024 13:03
Reveal.js in Vue
<template>
<div id="app">
<!-- <img src="./assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/> -->
<div class="reveal">
<div class="slides">
<section>Single Horizontal Slide</section>
<section>
<section>Vertical Slide 1</section>
<section>Vertical Slide 2</section>
@bmaupin
bmaupin / free-backend-hosting.md
Last active December 28, 2025 19:42
Free backend hosting
@LOG-TAG
LOG-TAG / VolleyOkHttp3StackInterceptors.java
Last active December 30, 2022 16:53
CREDITS: <1>https://gist.github.com/alashow/c96c09320899e4caa06b <2>https://gist.github.com/intari/e57a945eed9c2ee0f9eb9082469698f3 <3>https://gist.github.com/alirezaafkar/a62d6a9a7e582322ca1a764bad116a70 Reason: for making the Volley use latest okhttpstack work for latest version Volley 1.1.0 by removing all deprecated org.apache dependencies!
/**
* Created by @subrahmanya on 2/3/18.
* CREDITS:
*<1>https://gist.github.com/alashow/c96c09320899e4caa06b
*<2>https://gist.github.com/intari/e57a945eed9c2ee0f9eb9082469698f3
*<3>https://gist.github.com/alirezaafkar/a62d6a9a7e582322ca1a764bad116a70
*
*
* Reason: for making the Volley use latest okhttpstack work for latest version Volley 1.1.0 by removing all deprecated org.apache dependencies!
*/
@mujahidk
mujahidk / base64coding.groovy
Created December 22, 2017 23:40
Base64 encoding and decoding in Groovy.
def text = "Going to convert this to Base64 encoding!"
// Encode
def encoded = text.bytes.encodeBase64().toString()
println encoded
// Decode
byte[] decoded = encoded.decodeBase64()
println new String(decoded)
@damianopetrungaro
damianopetrungaro / .gitconfig
Last active September 12, 2021 18:41
Git aliases
# Need HUB Download here -> https://hub.github.com/
# Need commitizen and cz-conventional-changelog Download here -> http://slides.com/damianopetrungaro/working-with-git/#/0/17
```
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
ft = fetch
ftp = fetch -p