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
| 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
| 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
| 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
| 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
| -- обновляем все записи, которые уже есть в таблице | |
| 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
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| import java.util.concurrent.atomic.AtomicLong; | |
| /** | |
| * InfiniteStream.java | |
| * https://gist.github.com/bassemZohdy/e5fdd56de44cea3cd8ff | |
| * Created by sx on 26.02.16. | |
| */ | |
| public class Main { |
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
| ab -s 120 -k -p post.json -T application/json -c 1 -n 1000 -g out.dat http://localhost:8080/api/datas/ZZZ | |
| gnuplot plot.p | |
| plot.p | |
| # Output to a jpeg file | |
| set terminal jpeg size 1280,720 |
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
| import java.util.concurrent.CompletableFuture; | |
| import java.util.concurrent.atomic.AtomicLong; | |
| import java.util.function.Consumer; | |
| import java.util.function.Supplier; | |
| /** | |
| * Created by sx on 26.02.16. | |
| */ | |
| public class Main implements Supplier<Double>, Consumer, Runnable{ |
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
| import java.util.*; | |
| import java.util.concurrent.CompletableFuture; | |
| import java.util.concurrent.CountDownLatch; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| import java.util.concurrent.atomic.AtomicInteger; | |
| import java.util.concurrent.atomic.AtomicLong; | |
| import java.util.stream.Stream; | |
| import static java.util.concurrent.CompletableFuture.supplyAsync; |