Skip to content

Instantly share code, notes, and snippets.

Avatar

ratijas ratijas

View GitHub Profile
View linuxdeployqt.Dockerfile
FROM ubuntu:trusty
RUN apt-get update && apt-get install -y \
libglib2.0-0 \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://raw.githubusercontent.com/J-Rios/BASH-Scripts/master/install/install_qt5 \
&& chmod +x install_qt5 \
&& ./install_qt5 \
View qqc2-vs-labs-platform.qml
import QtQuick 2.12 as QQ
import QtQuick.Window 2.12 as QQW
import Qt.labs.platform 1.1 as QLP
import QtQuick.Controls 2.12 as QQC2
QQW.Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
@ratijas
ratijas / playground.rs
Created Apr 8, 2020 — forked from rust-play/playground.rs
Using Box<[T]> in Rust for multi-dimensional arrays
View playground.rs
use std::{fmt, ops};
pub struct Array2D<T> {
width: usize,
height: usize,
data: Box<[T]>,
}
impl<T> Array2D<T> {
pub fn new(size: (usize, usize)) -> Self
@ratijas
ratijas / RegQueryValueEx.rs
Last active Mar 11, 2020
Stable, safe, fast wrapper for RegQueryValueEx
View RegQueryValueEx.rs
/* common uses */
pub use std::ptr::{self, null, null_mut};
pub use widestring::*;
pub use winapi::shared::minwindef::*;
pub use winapi::shared::winerror::*;
pub use winapi::um::errhandlingapi::*;
pub use winapi::um::winbase::*;
pub use winapi::um::winnt::*;
pub use winapi::um::winreg::*;
View INSTALL.md

rage-quit plugin for oh-my-zsh

based on rage-quit support for bash

HOW TO INSTALL

Put the files below inside ~/.oh-my-zsh/custom/plugins/fuck

Add fuck to the loaded plugins inside your .zshrc, and enjoy. Autocomplete is included.

@ratijas
ratijas / README.md
Last active Jun 2, 2016
iTunes + AppleScript + async == launchd?
View README.md

#pre (section zero)

all of a sudden, i wanted something strange: get track info in iTunes completely with keyboard. however, there's one little but annoying point: if you ever made it into "lyrics" tab and your cursor stuck in textarea -- adiós -- you'll never git it out of there without help of mouse. and so, being fed up with that, i finally took some time to deal with problem in top down manner.

##first try

@ratijas
ratijas / installXLDVorbisDecoder.sh
Created Feb 17, 2016
decoding .ogg music files with XLD
View installXLDVorbisDecoder.sh
#!/bin/sh
# copyright 2016 Ratijas & Mac-J studio
# WTF Public Licence
# sadly, XLD still does not support .ogg files decoding out of the box.
# there's instruction with outdated download link: https://hydrogenaud.io/index.php/topic,81239.0.html,
# so here we'll recreate all necessary steps needed to patch up your XLD installation.
# we will need git, svn and Xcode (with command line tools)
# REWRITE following line if your XLD.app is not at /Applications
@ratijas
ratijas / 1-Webhooks_pyTelegramBotAPI.md
Last active Mar 27, 2019
Examples of webhook using pyTelegramBotAPI (BaseHTTPServer, Flask and CherryPy).
View 1-Webhooks_pyTelegramBotAPI.md

Webhook examples using pyTelegramBotAPI

There are 3 examples in this directory using different libraries:

  • Python (CPython): webhook_cpython_echo_bot.py
    • Pros:
      • Official python libraries, it works out of the box (doesn't require to install anything).
      • Works with Python 2 and Python 3 (need to be converted with 2to3).
    • Cons:
You can’t perform that action at this time.