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
// ==UserScript== | |
// @name Leetcode Timer | |
// @version 1.2 | |
// @grant none | |
// @include *://*leetcode.com/problems/* | |
// @author ketankr9 | |
// @namespace https://greasyfork.org/users/564674 | |
// @description Start a timer whenever a user loads a problem at Leetcode.com | |
// ==/UserScript== |
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
#!/bin/bash | |
echo $(($(cat /proc/net/dev | awk '{print $2}' | tail -n1) + $(cat /proc/net/dev | awk '{print $2}' | tail -n2 | head -n1))) |
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
TOKEN='****DECLARE YOUR TOKEN HERE****' | |
import time | |
import random | |
import telepot | |
from telepot.loop import MessageLoop | |
import requests | |
from datetime import datetime, timezone, date | |
import pytz | |
""" |
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 edit --force --full iitlogin.service | |
#enter the below script and make sure ```sudo chmod u+x /usr/local/bin/forti``` | |
---------------------------------------------------- | |
[Unit] | |
Description=IIT Lan Login | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
Type=simple |
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
# pylint: skip-file | |
import time | |
import re | |
import md5 | |
import requests | |
import json | |
INSTAGRAM_URL = "https://www.instagram.com" | |
HASHTAG_ENDPOINT = "/graphql/query/?query_hash={}&variables={}" |
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
#$$$ cat /etc/dovecot/dovecot.conf | |
## Dovecot configuration file | |
# If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration | |
# "doveconf -n" command gives a clean output of the changed settings. Use it | |
# instead of copy&pasting files when posting to the Dovecot mailing list. | |
# '#' character and everything after it is treated as comments. Extra spaces | |
# and tabs are ignored. If you want to use either of these explicitly, put the |
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/env bash | |
USED=$(ssh pratik@172.16.16.19 nvidia-smi | head -n9 | tail -n1 | awk {'print $9'}) | |
echo "GPU:$USED" | |
echo "---" | |
echo "$USED/12195MiB" | |
#SCRIPT_STATE=$(ssh pratik@172.16.16.19 'pgrep -fa "python\sNeuralStyleTransfer"') | |
#if [ -z "$SCRIPT_STATE" ]; then | |
# echo "Exit" | |
#else |
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
import java.io.*; | |
import java.net.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
class SimpleTCPClient | |
{ | |
private static Socket socket; | |
private static InputStream input; |
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
* know your public ip: ~$ `curl ipecho.net/plain; echo` | |
~$ `curl icanhazip.com` | |
* get headers only | |
curl -sI http://167.99.226.14:8000/tshirt.jpg | |
* split files and download: `https://www.maketecheasier.com/split-download-large-file-curl/` | |
curl --range 0-100000 -o song.mp3.part1 http://url/song.mp3 | |
curl --range 100001- -o song.mp3.part2 http://url/song.mp3 #till end, remaining | |
#join file | |
cat song.mp3.part? > song.mp3 |
NewerOlder