Skip to content

Instantly share code, notes, and snippets.

Avatar
Mehr Kuchen, mehr C++

aggsol

Mehr Kuchen, mehr C++
View GitHub Profile
@mricon
mricon / ff
Last active Sep 25, 2019
Convenient wrapper for firejail and firefox
View ff
#!/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 Jul 24, 2020
Constexpr GUID parsing (parsing string GUIDs at compile-time)
View guid.h
//-------------------------------------------------------------------------------------------------------
// constexpr GUID parsing
// Written by Alexander Bessonov
//
// Licensed under the MIT license.
//-------------------------------------------------------------------------------------------------------
#pragma once
#include <stdexcept>
#include <string>
View simple_meta_info_class.cpp
#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
The final code of an algorave session with Sonic Pi: the result is available here: http://www.newgrounds.com/audio/listen/745306
View experimental.rb
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 Apr 29, 2017
port of https://blog.gtk.org/2017/04/23/drag-and-drop-in-lists/ with scrolling and more advanced drag and drop
View main.vala
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 Sep 7, 2020
A simple ListBox to display Settings in a proper way.
View SettingsListBox.vala
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);
View corridors_of_code.rb
# 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 Mar 10, 2020
Sonic Pi in-app tutorials concatenated - last synced 2018-07-17 - https://sonic-pi.net/tutorial - https://github.com/samaaron/sonic-pi
View sonic-pi-tutorial.md

⚠️ This gist will no longer be updated when changes occur to master. This tutorial can now be found here instead: https://sonic-pi.net/tutorial.

1 Welcome to Sonic Pi

Welcome friend :-)

Welcome to Sonic Pi. Hopefully you're as excited to get started making crazy 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,

@crowbarsolutions
crowbarsolutions / CustomDataSourceRequestAttribute.cs
Last active Jun 30, 2020
Have Kendo or Telerik grid date time filters to ignore or not account for the time in the underlying data
View CustomDataSourceRequestAttribute.cs
using System.Web.Mvc;
using MyProject.ModelBinders;
using Kendo.Mvc.UI;
namespace MyProject.CustomAttributes
{
public class CustomDataSourceRequestAttribute : DataSourceRequestAttribute
{
public override IModelBinder GetBinder()
{
View chaiscript_oop.chai
// 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
You can’t perform that action at this time.