SDL_Init(SDL_INIT_AUDIO);
SDL_AudioSpec spec, aspec;
SDL_zero(spec);
spec.freq = 48000; //declare specs
spec.format = AUDIO_S16SYS;
spec.channels = 1;
spec.samples = 4096;
spec.callback = callback;
spec.userdata = NULL;
Discover gists
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
# Instruction + template repo: https://github.com/FedericoPonzi/rust-ci | |
# Search and replace <YOUR_BINARY_NAME> with your binary name. | |
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
tags: |
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
REM Delete eval folder with licence key and options.xml which contains a reference to it | |
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do ( | |
for /d %%a in ("%USERPROFILE%\.%%I*") do ( | |
rd /s /q "%%a/config/eval" | |
del /q "%%a\config\options\other.xml" | |
) | |
) | |
REM Delete registry key and jetbrains folder (not sure if needet but however) | |
rmdir /s /q "%APPDATA%\JetBrains" |
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 torch | |
from torch import LongTensor | |
from torch.nn import Embedding, LSTM | |
from torch.autograd import Variable | |
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence | |
## We want to run LSTM on a batch of 3 character sequences ['long_str', 'tiny', 'medium'] | |
# | |
# Step 1: Construct Vocabulary | |
# Step 2: Load indexed data (list of instances, where each instance is list of character indices) |
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
https://code.google.com/p/android/issues/detail?id=32696#c5 | |
If you have a certificate that is not | |
trusted by Android, when you add it, it goes in the personal cert store. | |
When you add a cert in this personal cert store, the system requires a | |
higher security level to unlock the device. But if you manage to add your | |
cert to the system store then you don't have this requirement. Obviously, | |
root is required to add a certificate to the system store, but it is quiet | |
easy. |
A custom JRE with Support for JCMD and Remote Debugging
# Java 11
JAVA_TARGET=custom-java-runtime
echo "Create trimmed down JDK" && \
$JAVA_HOME/bin/jlink \
--no-header-files \
See how a minor change to your commit message style can make a difference.
Tip
Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs
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
This gist provides a simple example of the various steps involved in making a java runtime image using the new jlink tool. | |
This example also has simple jni and shared library parts to show how jmod and jlink deal with those elements. | |
To build, just download the gist zip file, unzip that and cd into the gist directory, then: | |
# sh ungist | |
# ln -s ${JAVA_HOME} jdk | |
# make build | |
# make image | |
# make demo | |
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
# CLI | |
sudo apt update -y | |
sudo apt install -y \ | |
git curl \ | |
docker.io docker-buildx \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ | |
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \ | |
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \ | |
rbenv apache2-utils |
- Thinking Architecturally - Nathaniel Schutta - youtube
- Thinking Architecturally: Lead Technical Change Within Your Engineering Team - oreilly book
- Infrastructure & Ops Superstream Series: CI/CD - oreilly video
- Building Evolutionary Architectures - oreilly book
Notes (Thinking Architecturally - Nathaniel Schutta youtube video)
NewerOlder