Skip to content

Instantly share code, notes, and snippets.

Avatar
🏖️

Derry Pratama ibndias

🏖️
View GitHub Profile
@ibndias
ibndias / strongswan-roadwarrior-ipsec-vpn-guide.md
Last active Jun 3, 2022
strongswan-roadwarrior-ipsec-vpn-guide
View strongswan-roadwarrior-ipsec-vpn-guide.md

Strongswan Roadwarrior IPSec VPN Guide

Creates an easy Roadwarrior IPSec VPN by using StrongSwan on Ubuntu 22.04 with x509 authentication.

10.1.0.0/16 -- | 192.168.0.1 | === | x.x.x.x | -- 10.30.0.1
  moon-net          moon              carol       virtual IP
                  (Gateway)        (Roadwarrior)
View video_preview.html
<!--
Tutorial code for: http://www.binpress.com/tutorial/generating-nice-movie-previews-with-ffmpeg/138
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
</head>
<body>
<a href="https://www.youtube.com/watch?v=v1uyQZNg2vE" target="_blank" class="video-preview" data-frames="100" data-source="http://i.imgur.com/BX0pV4J.jpg"></a>
View ftdi-spi.xml
<?xml version="1.0" encoding="utf-16"?>
<FT_EEPROM>
<Chip_Details>
<Type>FT232H</Type>
</Chip_Details>
<USB_Device_Descriptor>
<VID_PID>0</VID_PID>
<idVendor>0403</idVendor>
<idProduct>6014</idProduct>
<bcdUSB>USB 2.0</bcdUSB>
@ibndias
ibndias / RiscV-Linux-on-Arty-A7-100T.md
Last active Feb 7, 2022
Quickstart Running Linux on Arty A7-100T FPGA
View RiscV-Linux-on-Arty-A7-100T.md

A quickstart guide to run Linux on Arty A7 100T FPGA

Because everyone keeps posting about Arty A7 35T while I only have the 100T. This is basically just a guide for linux on litex [https://github.com/litex-hub/linux-on-litex-vexriscv].

Requirements

  • Arty A7 100T FPGA
  • Micro USB Cable
  • and a PC

Prerequisites

@ibndias
ibndias / install_openssl_aarch64.sh
Created Jan 5, 2022 — forked from Matheus-Garbelini/install_openssl_aarch64.sh
Compile and install OpenSSL 1.1.1 for arm64 aarch64 android
View install_openssl_aarch64.sh
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz
tar -xvzf openssl-1.1.1.tar.gz
cd openssl-1.1.1/
./Configure linux-aarch64 --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
make -j$(($(nproc)+1))
sudo make install
sudo echo 'LD_LIBRARY_PATH=/usr/local/ssl/lib:${LD_LIBRARY_PATH}' >> /etc/environment
rm openssl-1.1.1.tar.gz
sudo rm openssl-1.1.1 -r
@ibndias
ibndias / keychronfn.sh
Created Oct 14, 2021
Keychron Function Key Ubuntu, use F1-F12 first, press FN to use multimedia
View keychronfn.sh
echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
sudo update-initramfs -u -k all
sudo reboot # optional
@ibndias
ibndias / maven_single_test.sh
Created Aug 18, 2021
Maven run single test
View maven_single_test.sh
mvn -Dtest=ClassNameTest#TestMethod test -DfailIfNoTests=false
@ibndias
ibndias / erase_from_memory.h
Created Jul 15, 2021 — forked from mimoo/erase_from_memory.h
Include this file to get the `erase_from_memory` function that zeros memory. See https://www.cryptologie.net/article/419/zeroing-memory-compiler-optimizations-and-memset_s/
View erase_from_memory.h
#ifndef __ERASE_FROM_MEMORY_H__
#define __ERASE_FROM_MEMORY_H__ 1
#define __STDC_WANT_LIB_EXT1__ 1
#include <stdlib.h>
#include <string.h>
void *erase_from_memory(void *pointer, size_t size_data, size_t size_to_remove) {
#ifdef __STDC_LIB_EXT1__
memset_s(pointer, size_data, 0, size_to_remove);
View printbuff.c
int i;
for (i = 0; i < 32; i++)
{
if (i > 0) printf(":");
printf("%02X", pk_buf[i]);
}
printf("\n");
ret =0;
View aria-cbc-test-openssl.c
#include <openssl/conf.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/engine.h>
#include <string.h>
#define MAX_MSG_LEN 256
static void handleErrors()