Skip to content

Instantly share code, notes, and snippets.

View autumnharmony's full-sized avatar
:octocat:
Github introduced status feature. Twitter is in danger

autumnharmony

:octocat:
Github introduced status feature. Twitter is in danger
View GitHub Profile
@autumnharmony
autumnharmony / complex
Created September 10, 2011 08:58
pascal complex var operations
{complex var operations}
procedure cmul(a,b:complex; var c:complex);
begin
c.x := a.x * b.x - a.y * b.y;
c.y := a.x * b.y + b.x * a.y;
end;
procedure csum(a,b:complex; var c:complex);
begin
c.x := a.x + b.x;
@autumnharmony
autumnharmony / flac2mp3
Created August 3, 2011 15:30
flac -> mp3
#!/bin/bash
OUT_DIR="./mp3"
[ ! -d ${OUT_DIR} ] && mkdir -p ${OUT_DIR}
# modify the lame options to your
# preference
lame_opts=" --vbr-new -V 2 -B 256 "
for FLAC in *.flac;
do
MP3=`basename "${FLAC%.flac}.mp3"`
[ -r "$FLAC" ] || { echo can not read file \"$FLAC\" >&1 ; exit 1 ; } ;
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ ./configure --with-curl
## --------- ##
## Platform. ##
#!/bin/bash
# Пример работы с VKAPI в shell-скрипте.
# Скрипт для работы с музыкой ВКонтакте. by snoopcatt.
_version="0.03a"
# Системные переменные
id="5807425" # системная переменная. ID создателя приложения. Взято из VK_Search Amarok Script (c)
method='audio.search' # метод поиска музыки ВКонтакте.
secret='dTckAoaSzH' # системная переменная. Секретный код приложения. Взято из VK_Search Amarok Script (c)
@autumnharmony
autumnharmony / Bit Flags
Created January 2, 2011 16:59
Битовые флаги C#
[Flags]
public enum AccessFlags{
NoAccess = 0x0,
ReadAccess = 0x1,
WriteAccess = 0x2,
ExecuteAccess = 0x4
}
if (F1.Info == F2.Info){
#region если вхождение в самом начале
Debug.WriteLine("предположительно есть совпадение в начале");
p = F1;
pp = F2;
//Node t = p;