Skip to content

Instantly share code, notes, and snippets.

View mariuz's full-sized avatar

Popa Marius Adrian mariuz

View GitHub Profile
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@fernandobatels
fernandobatels / Dockerfile
Last active August 19, 2020 11:47
Flamerobin for Firebird 3.0
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y flamerobin
RUN mkdir /root/.flamerobin
ENTRYPOINT [ "flamerobin" ]
@MIvanchev
MIvanchev / article.md
Last active April 4, 2023 13:39
Ever wondered what it takes to run Windows software on ARM? Then this article might be for you!
@berk76
berk76 / com_exe.md
Last active February 9, 2018 15:07
DOS: com vs exe

COM vs. EXE Program

EXE program can have any size whereas COM program can have maximally 64kB (just one segment).

COM Program

At the beginning of program there is program segment prefix (PSP). Because COM program is stored only in one segment so PSP occupies first 256 bytes (100h). Therefore start point begins at 100h. Values of segment registers are set to the begin of segment and don’t change during executing.

COM program in memory:

@berk76
berk76 / c_asm.md
Last active April 2, 2020 20:45
DOS: TASM and C

How to combine Assembly and C in DOS

This gist is showing an example of C program calling routine written in assembly.

Some theory

  • C is case sensitive so it is necessary to use /ml switch in TASM
  • C compiler uses leading underscore (_) character for function names
  • parameters are passed to function in stack and integer return value is passed back in AX register
  • stack cleaning is done by caller
@roboshoes
roboshoes / Spherical.cs
Last active November 22, 2017 22:29
Implementation of spherical coordinates in C# (based on https://github.com/mrdoob/three.js/blob/master/src/math/Spherical.js)
using UnityEngine;
public struct Spherical {
public float Radius;
public float Phi;
public float Theta;
Spherical( float radius = 1f, float phi = 0f, float theta = 0f ) {
Radius = radius;
@ryderstorm
ryderstorm / installing_rmagick_ubuntu_16.04.txt
Last active May 17, 2023 00:28
Installing rmagick gem on Ubuntu 16.04
# the instructions from here: https://stackoverflow.com/questions/3704919/installing-rmagick-on-ubuntu/31089915#31089915
# worked, but only after I added in line 8
sudo apt-get purge graphicsmagick graphicsmagick-dbg imagemagick-common imagemagick imagemagick-6.q16 libmagickcore-6-headers libmagickwand-dev graphicsmagick-libmagick-dev-compat
sudo apt-get autoremove
sudo apt-get install imagemagick libmagickwand-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
gem install rmagick
@wojtha
wojtha / migrate_rubocop_style_to_layout.rb
Last active January 10, 2019 10:37
Ruby script to migrate Rubocop settings from Style to Layout
# Fixes complains such as:
# .rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout
# .rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout
# .rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout
layouts = %w[
AccessModifierIndentation
AlignArray
AlignHash
AlignParameters
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active March 15, 2024 15:51
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
/**
* Author: David Asmuth
* Contact: piranha771@gmail.com
* License: Public domain
*
* Converts the .fbx model
* from Blender orientation system (Z is up, Y is forward)
* to the Unity3D orientation system (Y is up, Z is forward)
*/
using System.IO;