This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create background noise profile from mp3 | |
/usr/bin/sox noise.mp3 -n noiseprof noise.prof | |
# Remove noise from mp3 using profile | |
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21 | |
# Remove silence from mp3 | |
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5% | |
# Remove noise and silence in a single command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: test | |
CXX=clang++ | |
CPPFLAGS=-std=c++14 -O2 -Wall -pedantic -march=native | |
#CPPFLAGS+=-fsanitize=address,undefined | |
CPPFLAGS+=-I ~/custom/boost | |
test: main.o identifier.o enum.o | |
$(CXX) $(CPPFLAGS) -o $@ $^ $(LDFLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ADD_EXECUTABLE(demo test.cpp b.cpp) | |
SET(CMAKE_CXX_COMPILER g++-5) | |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \ | |
-std=c++1z \ | |
-g0 -O3 -pthread -march=native") | |
#-fsanitize=undefined,address | |
#-DBOOST_SPIRIT_X3_DEBUG=1 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/asio.hpp> | |
#include <boost/date_time/posix_time/posix_time.hpp> | |
#include <boost/asio/spawn.hpp> | |
#include <memory> | |
void bar(boost::asio::io_service &io, std::function<void()> cb){ | |
auto ptr = std::make_shared<boost::asio::deadline_timer>(io, boost::posix_time::seconds(1)); | |
ptr->async_wait([ptr, cb](const boost::system::error_code&){cb();}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "AbstractPoint.h" | |
#include <boost/serialization/export.hpp> | |
#include <boost/archive/text_oarchive.hpp> | |
#include <boost/archive/text_iarchive.hpp> | |
BOOST_CLASS_EXPORT_IMPLEMENT(AbstractPoint) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
Command: ./test Command: ./test | |
Massif arguments: (none) Massif arguments: (none) | |
ms_print arguments: massif.out.12835 | ms_print arguments: massif.out.8577 | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
GB GB | |
1.604^ # | 2.660^ # | |
| :@:# | | :::@::::# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
Command: ./test Command: ./test | |
Massif arguments: (none) Massif arguments: (none) | |
ms_print arguments: massif.out.12835 | ms_print arguments: massif.out.17227 | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
GB GB | |
1.604^ # | 1.605^ : | |
| :@:# | | :###################################################################: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ItemGroup Label="ProjectConfigurations"> | |
<ProjectConfiguration Include="Debug|Win32"> | |
<Configuration>Debug</Configuration> | |
<Platform>Win32</Platform> | |
</ProjectConfiguration> | |
<ProjectConfiguration Include="Debug|x64"> | |
<Configuration>Debug</Configuration> | |
<Platform>x64</Platform> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <iterator> | |
struct X { | |
X() = default; | |
X(X&&) = default; | |
X(X const&) = delete; | |
}; | |
template<typename Val> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* My first mini program */ | |
var pow2(n) | |
{ | |
var a = 2; | |
var i = 1; | |
while (i < n) | |
{ | |
a = a * 2; | |
i = i + 1; |