Skip to content

Instantly share code, notes, and snippets.

View aggsol's full-sized avatar
Mehr Kuchen, mehr C++

aggsol

Mehr Kuchen, mehr C++
View GitHub Profile
@mricon
mricon / ff
Last active September 25, 2019 07:15
Convenient wrapper for firejail and firefox
#!/bin/bash
# ff: convenient wrapper for firejail and firefox
#
# You can mix and match most keywords. Anything that's not a keyword
# will become the name of the private profile.
#
# Examples:
# ff
# - use basic defaults (no private directory, system resolver)
# ff 1dns personal
@AlexBAV
AlexBAV / guid.h
Last active April 14, 2024 12:50
Constexpr GUID parsing (parsing string GUIDs at compile-time)
//-------------------------------------------------------------------------------------------------------
// constexpr GUID parsing
// Written by Alexander Bessonov
//
// Licensed under the MIT license.
//-------------------------------------------------------------------------------------------------------
#pragma once
#include <stdexcept>
#include <string>
@eliasdaler
eliasdaler / simple_meta_info_class.cpp
Created September 26, 2017 09:31
Simple meta info class for this article: https://eliasdaler.github.io/meta-stuff
#include <iostream>
#include <memory>
#include <string>
#include <unordered_map>
#include <json.hpp>
using json = nlohmann::json;
template <typename Class>
@algorev
algorev / experimental.rb
Created May 19, 2017 15:30
The final code of an algorave session with Sonic Pi: the result is available here: http://www.newgrounds.com/audio/listen/745306
live_loop :dubstep do
use_synth :growl
play_pattern_timed [:c4, :f53, :c3], 1, amp: 2
end
live_loop :drums do
sample :loop_industrial
sample :misc_cineboom
sleep 0.9
end
@JMoerman
JMoerman / main.vala
Created April 29, 2017 10:10
port of https://blog.gtk.org/2017/04/23/drag-and-drop-in-lists/ with scrolling and more advanced drag and drop
using Gtk;
class DragListBox : ListBox {
private ListBoxRow? hover_row;
private ListBoxRow? drag_row;
private bool top = false;
private int hover_top;
private int hover_bottom;
private bool should_scroll = false;
private bool scrolling = false;
@SkyzohKey
SkyzohKey / SettingsListBox.vala
Last active February 4, 2023 04:12
A simple ListBox to display Settings in a proper way.
public class SettingsListBox: Gtk.Box {
public Gtk.Box scrolled_box;
public Gtk.ListBox listbox;
public SettingsListBox () {
this.set_orientation (Gtk.Orientation.HORIZONTAL);
Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow (null, null);
scroll.set_size_request (400, 1);
@thisismitch
thisismitch / corridors_of_code.rb
Created November 18, 2015 05:36
Sonic Pi Songs
# Chrono Trigger Soundtrack - Corridors of Time
# plug this into http://sonic-pi.net/
# still needs synth pads
# global config
use_bpm 112
def play_legato_note(note_value, duration)
release_duration = duration
@jwinder
jwinder / sonic-pi-tutorial.md
Last active September 22, 2023 20:12
Sonic Pi in-app tutorials concatenated - last synced 27-08-2023 - https://sonic-pi.net/tutorial.html - https://github.com/samaaron/sonic-pi - All credit & thanks to Sam Aaron!

1 Welcome to Sonic Pi

Welcome friend :-)

Welcome to Sonic Pi. Hopefully you're as excited to get started making your own sounds as I am to show you. It's going to be a really fun ride where you'll learn all about music, synthesis, programming, composition, performance and more.

@crowbarsolutions
crowbarsolutions / CustomDataSourceRequestAttribute.cs
Last active April 12, 2023 09:16
Have Kendo or Telerik grid date time filters to ignore or not account for the time in the underlying data
using System.Web.Mvc;
using MyProject.ModelBinders;
using Kendo.Mvc.UI;
namespace MyProject.CustomAttributes
{
public class CustomDataSourceRequestAttribute : DataSourceRequestAttribute
{
public override IModelBinder GetBinder()
{
// ChaiScript has its own simple object model and works well with object
// oriented C++
// There is no difference between a function and a method, it's just syntactic sugar
var s = "mystring".size() // returns 8
var s2 = size("mystring") // returns 8
// class syntax