This file contains hidden or 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 android.media.Image; | |
import android.os.Bundle; | |
import android.util.Size; | |
import androidx.annotation.NonNull; | |
import androidx.annotation.Nullable; | |
import androidx.annotation.OptIn; | |
import androidx.appcompat.app.AppCompatActivity; | |
import androidx.camera.core.Camera; | |
import androidx.camera.core.CameraSelector; |
This file contains hidden or 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
#define swap_endianess32(val) (((val>>24) & 0xffu) | ((val>>8) & 0xff00u) | ((val<<8) & 0xff0000u) | ((val<<24) & 0xff000000u)) | |
#define swap_endianess64(val) (((val>>56) & 0xffull) | ((val>>40) & 0xff00ull) | ((val>>24) & 0xff0000ull) | ((val>>8) & 0xff000000ull) | ((val<<8) & 0xff00000000ull) | ((val<<24) & 0xff0000000000ull) | ((val<<40) & 0xff000000000000ull) | ((val<<56) & 0xff00000000000000ull)) |
This file contains hidden or 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://docs.walletconnect.com/2.0/quick-start/dapps/client | |
import WalletConnectClient from "@walletconnect/client"; | |
import { CLIENT_EVENTS } from "@walletconnect/client"; | |
const TESTNET = 'stellar:testnet'; | |
const PUBNET = 'stellar:pubnet'; | |
const STELLAR_METHODS = { | |
SIGN: 'stellar_signAndSubmitXDR', |
This file contains hidden or 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 java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.net.DatagramPacket; | |
import java.net.DatagramSocket; | |
import java.net.InetAddress; | |
import java.net.SocketException; | |
import java.net.UnknownHostException; |
This file contains hidden or 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
#version 100 | |
precision mediump float; | |
uniform sampler2D u_texId; | |
// render target width | |
uniform float u_rt_w; | |
// render target height | |
uniform float u_rt_h; | |
// width of a low resolution pixel |
This file contains hidden or 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
######### | |
# System utility written in python that create a background service from executable. | |
# Service created will be run as: sudo service MyService {start|stop|restart|status} | |
# Run: sudo python addSystemService.py [executable name] [service name] [user] | |
# Example: sudo python addSystemService.py ./project/my_project.py MyPorjectService root options | |
######### | |
from sys import argv | |
import os | |
import stat |
This file contains hidden or 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
function cpAsync(srcPath,destPath,callback){ | |
var rs = fs.createReadStream(srcPath); | |
var ws = fs.createWriteStream(destPath); | |
rs.on('error', function(err) { | |
console.log(err); | |
}); | |
ws.on('error', function(err) { | |
console.log(err); |