Skip to content

Instantly share code, notes, and snippets.

View msfrms's full-sized avatar
🏠
Working from home

Mikhail Radaev msfrms

🏠
Working from home
View GitHub Profile
@msfrms
msfrms / number-of-open-files.sh
Created November 7, 2019 12:19 — forked from mrfyda/number-of-open-files.sh
Show open file descriptors for Java processes
for pid in `pidof java`; do echo "$(< /proc/$pid/cmdline)"; egrep 'files|Limit' /proc/$pid/limits; echo "Currently open files: $(ls -1 /proc/$pid/fd | wc -l)"; echo; done
RACSignal * signal1 = [[RACSignal return:@1] delay:1];
RACSignal * signal2 = [[RACSignal return:@2] delay:1];
RACSignal * signal3 = [[[RACSignal return:@3] delay:3] doNext:^(id x) {
NSLog(@"complete signal 3");
}];
RACSignal * signal4 = [[RACSignal return:@4] delay:1];
RACSignal * signal5 = [[RACSignal return:@5] delay:1];
// требуется сделать 2 сигнала паралельно, потом 1 последовательно, 2 паралельно
RACSignal *signal6 = [[RACSignal zip:@[signal1, signal2]] doNext:^(id x) {
@msfrms
msfrms / apns-pem
Created May 4, 2018 11:46 — forked from fahied/apns-pem
Create pem file for apple push notifications
Development Phase:
Step 1: Create Certificate .pem from Certificate .p12
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
Step 2: Create Key .pem from Key .p12
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
Step 3: Optional (If you want to remove pass phrase asked in second step)
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem