Skip to content

Instantly share code, notes, and snippets.

@rdcm
rdcm / mingw-w64-x86_64.cmake
Created April 25, 2021 17:58 — forked from peterspackman/mingw-w64-x86_64.cmake
cmake toolchain file for mingw-w64 x86_64 builds on Ubuntu
# Sample toolchain file for building for Windows from an Ubuntu Linux system.
#
# Typical usage:
# *) install cross compiler: `sudo apt-get install mingw-w64`
# *) cd build
# *) cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw-w64-x86_64.cmake ..
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
namespace ReferenceCounting
{
using System;
using System.Collections.Concurrent;
public interface IReferenceCounter
{
void Increment();
void Decrement();
DisplayProgressbar: Building Player
Invoking UnityLinker with response file. response.rsp contents: -out="{projectPath}/Temp/StagingArea/Data/Managed/tempStrip" -x="{projectPath}/Temp/StagingArea/Data/Managed/TypesInScenes.xml" -x="{projectPath}/Assets/Plugins/Zenject/Source/Usage/link.xml" -d="{projectPath}/Temp/StagingArea/Data/Managed" --include-unity-root-assembly="{projectPath}/Temp/StagingArea/Data/Managed/Shooter.Client.SettingsStorage.dll" --include-unity-root-assembly="{projectPath}/Temp/StagingArea/Data/Managed/Shooter.Client.Controllers.dll" --include-unity-root-assembly="{projectPath}/Temp/StagingArea/Data/Managed/Shooter.Client.Installers.dll" --include-unity-root-assembly="{projectPath}/Temp/StagingArea/Data/Managed/Shooter.Client.Backend.dll" --include-unity-root-assembly="{projectPath}/Temp/StagingArea/Data/Managed/MessagePack.dll" --include-unity-root-assembly="{projectPath}/Temp/StagingArea/Data/Managed/Shooter.Client.Scripts.dll" --include-unity-root-assembly="{projectPath}/Temp/StagingArea
@rdcm
rdcm / rownum.sql
Created March 3, 2020 13:31 — forked from tototoshi/rownum.sql
Grouped LIMIT in PostgreSQL: show the first N rows for each group
-- http://stackoverflow.com/questions/1124603/grouped-limit-in-postgresql-show-the-first-n-rows-for-each-group
-- http://www.postgresql.jp/document/9.2/html/tutorial-window.html
CREATE TABLE empsalary (
depname varchar(10) not null
, empno integer not null
, salary integer not null
);
INSERT INTO empsalary (depname, empno, salary) VALUES ('develop', 11, 5200);
@rdcm
rdcm / rownum.sql
Created March 3, 2020 13:31 — forked from tototoshi/rownum.sql
Grouped LIMIT in PostgreSQL: show the first N rows for each group
-- http://stackoverflow.com/questions/1124603/grouped-limit-in-postgresql-show-the-first-n-rows-for-each-group
-- http://www.postgresql.jp/document/9.2/html/tutorial-window.html
CREATE TABLE empsalary (
depname varchar(10) not null
, empno integer not null
, salary integer not null
);
INSERT INTO empsalary (depname, empno, salary) VALUES ('develop', 11, 5200);
@rdcm
rdcm / Howto convert a PFX to a seperate .key & .crt file
Created May 24, 2019 12:19 — forked from TemporaryJam/Howto convert a PFX to a seperate .key & .crt file
How to convert a .pfx SSL certificate to .crt/key (pem) formats. Useful for NGINX
source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]`
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file.
Now let’s extract the certificate:
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]`
@echo on & @setlocal enableextensions
@echo =========================
@echo Turn off the time service
net stop w32time
@echo ======================================================================
@echo Set the SNTP (Simple Network Time Protocol) source for the time server
w32tm /config /syncfromflags:manual /manualpeerlist:"0.it.pool.ntp.org 1.it.pool.ntp.org 2.it.pool.ntp.org 3.it.pool.ntp.org"
@echo =============================================
@echo ... and then turn on the time service back on
net start w32time
/*
Delta Compression (Round 2) by Glenn Fiedler.
This source code is placed in the public domain.
http://gafferongames.com/2015/03/14/the-networked-physics-data-compression-challenge/
*/
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
/*
Delta Compression by Glenn Fiedler.
This source code is placed in the public domain.
http://gafferongames.com/2015/03/14/the-networked-physics-data-compression-challenge/
*/
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
@rdcm
rdcm / Install_gcc7_ubuntu_16.04.md
Created May 10, 2019 21:37 — forked from jlblancoc/Install_gcc7_ubuntu_16.04.md
Installing gcc-7 & g++-7 in Ubuntu 16.04LTS Xenial

Run the following in the terminal:

Install the gcc-7 packages:

sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Set it up so the symbolic links gcc, g++ point to the newer version: