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" | |
"io/ioutil" | |
"log" | |
"time" | |
"github.com/chromedp/chromedp" | |
) |
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
ulimit | |
update os | |
install wget , zip , unzip , tcpdump | |
os limit | |
allow soduer | |
allow no password | |
swap 16 G |
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
sudo systemctl enable mongodb | |
show dbs | |
use admin | |
db.dropUser("yyyy") | |
db.createUser({user:"zzzz", pwd:"xxxx", roles:[{role:"root", db:"admin"}]}) | |
mongo -u admin -p admin123 --authenticationDatabase admin | |
enabled within the security section of your mongod.conf file (like below). | |
security: |
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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
/** | |
* Respond with hello worker text | |
* @param {Request} request | |
*/ | |
async function handleRequest(request) { | |
if (request.method !== 'POST') { | |
return new Response('Method Not Allowed', { status: 405 }) |
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" | |
) |