Skip to content

Instantly share code, notes, and snippets.

View badescunicu's full-sized avatar

Nicu Badescu badescunicu

View GitHub Profile
@badescunicu
badescunicu / .bashrc
Last active August 17, 2017 10:20
My .vimrc file
export HISTCONTROL=ignoredups:erasedups
export HISTSIZE=-1
export HISTFILESIZE=-1
shopt -s histappend
@badescunicu
badescunicu / mcat.c
Last active August 29, 2015 14:16
so_lab2_linux
/**
* SO, 2011
* Lab #2, Procese
*
* Task #2, Linux
*
* cat/cp applications
*/
#include <errno.h>
<Template src="skin:effect_parameter_knob.xml">
<SetVariable name="Effect">1</SetVariable>
<SetVariable name="EffectParameter">4</SetVariable>
</Template>
<Template src="skin:effect_parameter_knob.xml">
<SetVariable name="Effect">1</SetVariable>
<SetVariable name="EffectParameter">5</SetVariable>
</Template>
<Template src="skin:effect_parameter_knob.xml">
<SetVariable name="Effect">1</SetVariable>
#include <lilv-0/lilv/lilv.h>
#include "lv2/lv2plug.in/ns/ext/event/event.h"
#include "lv2/lv2plug.in/ns/ext/midi/midi.h"
#include "lv2/lv2plug.in/ns/ext/port-groups/port-groups.h"
#include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h"
#include <iostream>
using namespace std;
@badescunicu
badescunicu / enginefilteriir.cpp
Last active August 29, 2015 14:03
ramping coefs
void EngineFilterIIRBand::setFrequencyCorners(int sampleRate,
double freqCorner1,
double freqCorner2) {
m_sampleRate = sampleRate;
memcpy(m_oldCoef, m_coef, MAX_COEFS * sizeof(double));
m_coef[0] = fid_design_coef(m_coef + 1, 16, "BpBe8", m_sampleRate,
freqCorner1, freqCorner2, 0);
m_doRamping = true;
//initBuffers();
}
@badescunicu
badescunicu / top100beatport.py
Last active December 1, 2022 21:26
Beatport top 100 track names parser
#!/usr/bin/python
import sys
import urllib
import re
from datetime import datetime
# usage: ./top100beatport <genre> <url_to_top100>
def extract_file_names(url):
url_bulk_text = urllib.urlopen(url).read()
@badescunicu
badescunicu / pushbutton.xml
Created June 6, 2014 23:29
code before <KnobComposed>
<PushButton>
<Size>20f,20f</Size>
<NumberStates>2</NumberStates>
<State>
<Number>0</Number>
<Text>D</Text>
</State>
<State>
<Number>1</Number>
<Text>E</Text>
@badescunicu
badescunicu / Main.java
Created March 21, 2014 20:14
Dropbox's Java SDK file upload test
// Include the Dropbox SDK.
import com.dropbox.core.*;
import java.io.*;
import java.util.Locale;
public class Main {
public static void main(String[] args) throws IOException, DbxException {
// The keys for my Dropbox test application
final String APP_KEY = "ja5m0h48oxetwr7";
@badescunicu
badescunicu / gist:8585581
Created January 23, 2014 19:52
Mail despre NASA World Wind Europa Challenge
Hi all,
The ICA-OSGeo Lab Network and MundoGEO are now pleased to inform the fourth webinar of the “Open Geospatial Science & Applications” webinar series on February 13th , 2014. The webinars will be open and free to all on first come register basis.
This webinar will be on NASA World Wind and also on the Europa Challenge by Patrick Hogan (NASA) and Maria Antonia Brovelli (Politecnico di Milano, Italy)
Could i also request you to inform your students about the NASA World Wind Europa Challenge http://eurochallenge.como.polimi.it/ and encourage them to apply. You can see last year's winning projects at http://eurochallenge.como.polimi.it/projects2013
To register for the webinar please go to https://www2.gotomeeting.com/register/604781066
@badescunicu
badescunicu / create_players.py
Created October 5, 2013 11:17
create_players
# după ce activezi sandboxul, rulează ./manage.py shell
# și scrie acolo import create_players
from wouso.core.user.models import User
for i in range(15):
name = 'student' + str(i)
user = User.objects.create(username=name)
user.set_password('student')
user.save()