Skip to content

Instantly share code, notes, and snippets.

View thelazyindian's full-sized avatar
🎯
Focusing

Satyabrata Sahoo thelazyindian

🎯
Focusing
View GitHub Profile
{
"awardedControlledTokens": [
{
"amount": "195977185",
"prize": {
"awardedTimestamp": "1624561922",
"prizePool": {
"id": "0x887e17d791dcb44bfdda3023d26f7a04ca9c7ef4",
"underlyingCollateralDecimals": "6",
"underlyingCollateralName": "(PoS) Tether USD",
missions (collection) {
randomDocumentId (documentId) {
details (collection) {
details (documentId) {
details "all mission details text" (string)
}
}
microtasks (collection) {
microtask-1 (documentId) {
answer "Cascading"
cd ~
wget https://docs.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA&export=download
mv ~/uc\?id\=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA ~/gdrive
sudo install ~/gdrive /usr/local/bin/
rm -rf ~/gdrive
echo "Type \"gdrive list\" to get going"
To know what is inside file1.txt but not in file2.txt
awk 'NR==FNR{a[$0]=1;next}!a[$0]' file2 file1
To delete everything in a dir except file.txt
find . ! -name 'file.txt' -type f -exec rm -f {} +
Remove first n character from bunch of file names with Cut
rename -n 's/(.{5})(.*)$/$2/' *.*
The -n is for simulating; remove it to get the actual result.
<?php
//open connection to mysql db
$connection = mysqli_connect("localhost","root","","students") or die("Error " . mysqli_error($connection));
//fetch table rows from mysql db
$sql = "select * from name";
$result = mysqli_query($connection, $sql) or die("Error in Selecting " . mysqli_error($connection));
//create an array
http://abclive.abcnews.com/i/abc_live4@136330/master.m3u8
http://mumsite.cdnsrv.jio.com/jiotv.live.cdn.jio.com/Mastiii/Mastiii_800.m3u8
http://jiotv.live.cdn.jio.com/Sony_BBC_Earth_HD/Sony_BBC_Earth_HD_TAB.m3u8
http://hotstar.live.cdn.jio.com/Star_Plus_HD/Star_Plus_HD.m3u8
http://hotstar.live.cdn.jio.com/Life_OK_HD/Life_OK_HD.m3u8
http://jiotv.live.cdn.jio.com/Zindagi/Zindagi_TAB.m3u8
http://hotstar.live.cdn.jio.com/Channel_V/Channel_V.m3u8
http://jiotv.live.cdn.jio.com/DD_National/DD_National_TAB.m3u8
http://mumsite.cdnsrv.jio.com/jiotv.live.cdn.jio.com/Neo_Prime/Neo_Prime_800.m3u8
http://smumcdnems03.cdnsrv.jio.com/jiotv.live.cdn.jio.com/Star_Sports_HD_1/Star_Sports_HD_1.m3u8
@thelazyindian
thelazyindian / install-jenkins.sh
Last active April 3, 2017 10:34
Script to install Jenkins
tput setaf 1
echo "Installing Jenkins..."
echo ""
tput setaf 7
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update -y
sudo apt-get install jenkins nginx openjdk-8-jre openjdk-8-jdk -y
tput setaf 1
echo ""
#!/bin/sh
repo_name=$1
test -z $repo_name && echo "Repo name required." 1>&2 && exit 1
curl -u 'your_github_username' https://api.github.com/user/repos -d "{\"name\":\"$repo_name\"}"