Skip to content

Instantly share code, notes, and snippets.

View shybovycha's full-sized avatar

Artem Shubovych shybovycha

View GitHub Profile
@mbinna
mbinna / effective_modern_cmake.md
Last active May 6, 2024 17:19
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@iwalpola
iwalpola / stm32_gpio_reg.md
Last active May 2, 2024 08:40
STM32 GPIO registers cheatsheet
@FiloSottile
FiloSottile / 32.asm
Last active March 23, 2024 12:28
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
@afeld
afeld / gist:5704079
Last active November 27, 2023 15:43
Using Rails+Bower on Heroku
@begoon
begoon / gist:3252006
Created August 3, 2012 22:08
Русско-английский словарь деловой переписки
  1. Господи, это опять вы.... - Thank you very much for your email.
  2. Если до завтра не предоставите документы, пеняйте на себя. Тут вам не детский сад.- We will do our best to proceed with your request however for the best result the documents should reach us not later than tomorrow.
  3. Вы читать умеете? - You can find this information below.
  4. Сколько можно напоминать!- Kind reminder
  5. Неужели так сложно подписать документ там, где нужно - Please sign in the place marked with yellow sticker
  6. Что у тебя в школе было по математике? - Let's reconfirm the figures.
  7. Мы лучше сделаем это сами.- Thank you for your kind assistance.
  8. Я уже сто раз вам это присылал. - Kindly find attached.
  9. Ага, сейчас все брошу и побегу разбираться. - I’ll look into it and revert soonest.
  10. Да поймите же вы наконец - Please kindly review the matter again.
@killercup
killercup / README.md
Created March 16, 2012 11:03
Unicorn, RVM Wrapper, Init.d

You have your Rails Apps with specific Gemsets in RVM.

The following commands creates a wrapped unicorn_rails bin. Be sure to replace the variables and that you have unicorn in your bundle.

rvmsudo rvm wrapper [RUBY VERSION]@[GEMSET] [GEMSET] unicorn_rails

Now you have a /usr/local/rvm/bin/[GEMSET]_unicorn_rails I will refer to [GEMSET]_unicorn_rails as [WRAPPED_NAME]

@tubalmartin
tubalmartin / mobile_detector.php
Created January 3, 2012 15:06
Lightweight detector of mobile devices, OSs & browsers (PHP)
<?php
/*
* Lightweight detector of mobile devices, OSs & browsers
* Copyright 2012 Túbal Martín (email: tubalmartin@gmail.com)
* License: GPL2
*/
if ( ! function_exists('mobile_detector') )
{
@csanz
csanz / to generate a human readable time range using ruby on rails
Created November 9, 2010 18:58
to generate a human readable time range using ruby on rails
def humanize secs
[[60, :seconds], [60, :minutes], [24, :hours], [1000, :days]].inject([]){ |s, (count, name)|
if secs > 0
secs, n = secs.divmod(count)
s.unshift "#{n.to_i} #{name}"
end
s
}.join(' ')
end
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8 />
<title>WebP Demo</title>
<script src="weppy.js"></script>
</head>
<body>
<h1>WebP Demo</h1>
<img src="mandelbrot.webp" width="500">