This file contains hidden or 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
-- обновляем все записи, которые уже есть в таблице | |
UPDATE existing_table ex | |
SET field1 = ex.field1 + up.field1, | |
field2 = up.field2, | |
… | |
FROM updates up | |
WHERE ex.pkey_field1 = up.pkey_field1 AND ex.pkey_field2 = up.pkey_field2 …; |
This file contains hidden or 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
sudo apt-get install fluidsynth fluid-soundfont-gm fluid-soundfont-gs lame | |
git clone https://github.com/beschulz/wav2png | |
gst-launch-1.0 filesrc location=222.mid ! midiparse ! fluiddec ! pulsesink | |
gst-launch-1.0 filesrc location=222.mid ! midiparse ! fluiddec ! audioconvert ! audio/x-raw,channels=1 ! lamemp3enc ! filesink location=222.mp3 | |
gst-launch-1.0 filesrc location=222.mid ! midiparse ! fluiddec ! audioconvert ! audio/x-raw,channels=1,format=S16LE ! wavenc ! filesink location=222.wav | |
fluiddec synth-chorus=false synth-reverb=false synth-gain=1 | |
audioconvert ! rgvolume pre-amp=6.0 headroom=10.0 ! rglimiter ! audioconvert | |
fluidsynth -C0 -R0 -O s16 -F 222.wav /usr/share/sounds/sf2/FluidR3_GM.sf2 222.mid |
This file contains hidden or 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
for i in *.gz; do j=`echo $i | sed 's/^calls\.log\.\([[:digit:]]\{8\}\)\.gz$/\1\.be1\.gz/g'`; mv "$i" "$j"; done |
This file contains hidden or 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
task listJars << { | |
configurations.compile.each { File file -> | |
println file.name | |
def files = zipTree(file) | |
files.each { File file2 -> | |
println file2.path + file2.name | |
} | |
} | |
} |
This file contains hidden or 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
apply plugin: 'application' | |
apply plugin: 'maven' | |
repositories { | |
mavenCentral() | |
mavenLocal() | |
} | |
dependencies { | |
runtime fileTree(dir: 'libs', include: '*.jar') |
This file contains hidden or 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
curl -v --digest -u "79215738505:xxxxx" https://im.megafon.ru/services/resource-lists/users/[email protected]/generallist.xml |
This file contains hidden or 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
// run top -p<PID> -b -d 1.0 > tmpfile | |
// code for prepare below | |
var fs = require('fs'); | |
var FILESRC; | |
var PID; | |
var SEPARATOR=","; | |
process.argv.forEach(function(val, index, array) { |
This file contains hidden or 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
location /api { | |
proxy_pass http://localhost:8080/api; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
add_header Access-Control-Allow-Origin *; | |
if ($request_method = OPTIONS ) { | |
add_header Allow 'POST, GET, PUT, DELETE, OPTIONS'; | |
add_header Access-Control-Allow-Origin *; |
This file contains hidden or 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
void runMidi() throws MidiUnavailableException, InvalidMidiDataException, InterruptedException{ | |
MidiDevice.Info[] mdi = MidiSystem.getMidiDeviceInfo(); | |
MidiDevice out = null; | |
for(MidiDevice.Info info : mdi){ | |
System.out.println(info); | |
if("Microsoft GS Wavetable Synth".equals(info.getName())){ | |
out = MidiSystem.getMidiDevice(info); | |
} | |
} | |
This file contains hidden or 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
utf8string = unicodestring.encode('UTF-8') | |
and back again | |
unicodestring = unicode(utf8string, 'UTF-8') |