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 streaming; | |
import java.util.concurrent.Semaphore; | |
import javax.sound.sampled.AudioFormat; | |
import javax.sound.sampled.AudioSystem; | |
import javax.sound.sampled.DataLine; | |
import javax.sound.sampled.Line; | |
import javax.sound.sampled.LineUnavailableException; | |
import javax.sound.sampled.Mixer; |
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
For Jboss 4,5,6 AS and 6.x EAP standalone mode, append to your JAVA_OPTS the following option: | |
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n | |
For Jboss 7.x AS/EAP 6.x in domain mode, in host.xml add the corresponding jvm option in the server group you need to debug: | |
<server name="server-one" group="main-server-group"> | |
<!-- Remote JPDA debugging for a specific server | |
<jvm name="default"> | |
<jvm-options> |
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
Gunicorn, or Green Unicorn, is a UNIX-compatible WSGI HTTP server that is commonly used to run Python applications. | |
Developed in 2010 by Benoit Chesneau, this open source project is similar to uWSGI, mod_wsgi, and CherryPy. | |
Gunicorn is often implemented with a reverse proxy server like NGINX, which typically handles requests for static resources and then passes on the requests to Gunicorn. | |
Gunicorn processes the dynamic portion of the request and returns a response to NGINX, which sends the response back to the client. | |
Gunicorn can be used to serve Python applications and is compatible with frameworks like Django, Flask and Bottle. | |
It’s easy to configure, lightweight, and only needs 4–12 worker processes to handle hundreds or thousands of requests per second. | |
# create python3 virtual environment | |
# ================================== |
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 javax.crypto.Cipher; | |
class Test { | |
public static void main(String[] args) { | |
try { | |
System.out.println("Hello World!"); | |
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES"); | |
System.out.println(maxKeyLen); | |
} catch (Exception e){ | |
System.out.println("Sad world :("); |
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
# /etc/binfmt.d/qemu-arm.conf | |
:arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static: |
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
Simple Python Word Frequency Analyzer |
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
* Rather use https://gist.github.com/mydoghasworms/4888a832e28491c3fe47 | |
* The alternative is a better parser although it is not an emmitter) | |
*----------------------------------------------------------------------* | |
* CLASS json_util DEFINITION | |
*----------------------------------------------------------------------* | |
class json_util definition. | |
public section. | |
class-methods: | |
data_to_json importing data type any | |
returning value(json) type string, |
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
MIT License | |
Copyright (c) 2023 Thomas GAUDIN | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
#!/bin/bash | |
#name=Backup flash and appdata | |
#description=Creates tarballs of the flash drive and appdata share. | |
#argumentDescription=Backup directory | |
#argumentDefault=/mnt/user/Backup/Sovngarde | |
#arrayStarted=true | |
#noParity=true | |
#clearLog=true | |
set -eo pipefail | |
shopt -s extglob |
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
#!/usr/bin/env python | |
""" | |
iCal Combine | |
./icalcombine.py <input URLs file> <output filename> | |
Read ICS (iCAL) URLs, one per line, from the <input URLs files>, then combine | |
into a single iCal which is written to <output filename>. | |
""" | |
import sys |
OlderNewer