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
Get-ChildItem -Path D:\wamp64\www\product_golang\telirco\product\sms_esb\bin\linux_service\worker_db_queue_bulk\* -Recurse | Where-Object {$_ -match "peertopeer"} | Ren -NewName {$_ -replace "peertopeer","bulk"} |
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
echo "_ZNSt12_Bind_simpleIFPFvSsSsEPcS2_EE9_M_invokeIJLm0ELm1EEEEvSt12_Index_tupleIJXspT_EEE+0xa0" | c++filt | |
nm -D telircoampq.so |
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
for i in $(seq 1 100); do printf "\r%s%%" "$i"; sleep 0.1; done | |
for i in {1..100}; do | |
percent=$(($i)) | |
printf "\r%s%%" "${percent}" | |
sleep 0.1 | |
done |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"time" | |
"golang.org/x/time/rate" | |
) |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
) | |
func main() { | |
// Read existing hosts file |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/redis/go-redis/v9" | |
"sync" | |
"time" | |
) |
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
fmt.Println(runtime.NumGoroutine()) | |
// Get the stack traces of all currently running Goroutines. | |
stackTrace := make([]runtime.StackRecord, 1024) | |
length, ok := runtime.GoroutineProfile(stackTrace) | |
// Print out the stack traces. | |
fmt.Println("Stack traces of all Goroutines:") | |
for i := 0; i < length; i++ { | |
fmt.Println(stackTrace[i].Stack()) |
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
package main | |
import ( | |
"crypto/tls" | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
) |
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
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"encoding/pem" | |
"fmt" | |
"io/ioutil" | |
) |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import ssl | |
import socket | |
import os | |
import sys | |
from argparse import ArgumentParser | |
from argparse import RawTextHelpFormatter | |
from threading import Thread |