Skip to content

Instantly share code, notes, and snippets.

View krishnachaitanya7's full-sized avatar
🎯
Focusing

Krishna krishnachaitanya7

🎯
Focusing
View GitHub Profile
@krishnachaitanya7
krishnachaitanya7 / Transmission_Settings.json
Created February 3, 2018 06:47
Transmission Settings
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
@krishnachaitanya7
krishnachaitanya7 / interfaces
Created November 1, 2017 18:18
/etc/network interfaces file for orangepi zero
source /etc/network/interfaces.d/*
# This file intentionally left blank
#
# All interfaces are handled by network-manager, use nmtui or nmcli on
# server/headless images or the "Network Manager" GUI on desktop images
auto eth0
iface eth0 inet static
address 10.208.20.56
#10.32.32.56
@krishnachaitanya7
krishnachaitanya7 / gen_hosts_entries.py
Last active November 10, 2017 05:53
Generate /etc/hosts entries by inputing ipv6 address and human readable name inside all_entries list
all_entries = [['06','0d','61','fc','moteid2'],
['06','0d','b2','8b','moteid6']]
for each_entry in all_entries:
print 'aaaa::212:4b00:'+each_entry[0]+each_entry[1]+':'+each_entry[2]+each_entry[3]+' '+each_entry[4]
print 'fe80::212:4b00:'+each_entry[0]+each_entry[1]+':'+each_entry[2]+each_entry[3]+' '+each_entry[4]
print 'fe:80:00:00:00:00:00:00:02:12:4b:00:'+each_entry[0]+':'+each_entry[1]+':'+':'+each_entry[2]+':'+each_entry[3]+' '+each_entry[4]
print '\n'
@krishnachaitanya7
krishnachaitanya7 / squid proxy config
Created October 8, 2017 09:11
Used for allowing tunneled SSH connection requests. Future Work to be implemented in Dante
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
@krishnachaitanya7
krishnachaitanya7 / URL_Incrementer.js
Created July 24, 2017 19:02
Can be used to increment the last number in URL provided if its a number. Can be useful specially in Wallpaper Finding websites
// ==UserScript==
// @name wallpaper_finder
// @namespace http://your.homepage/
// @version 1.0
// @description Website Navigator With Arrow Key Press
// @match http://wallpaperswide.com/*
// ==/UserScript==
function next_page_number(){
k = window.location.href;
var urlarray = k.split('/');
@krishnachaitanya7
krishnachaitanya7 / Majority_Vote.py
Last active July 23, 2017 15:12
This is a utility to generate all decision types from all.txt, 0 for animal, 1 for human, 2 for clutter. By this an overview can be achieved on which type of algorithm can perform better
'''
This is a utility to generate all decision types from all.txt, 0 for animal, 1 for human, 2 for clutter. By this an overview can be achieved on which type of algorithm can perform better
'''
import xlwt
from itertools import groupby
def print_required_info(tuplearray1, final_indice1):
global row_number
global sheet
ones_power = 0
@krishnachaitanya7
krishnachaitanya7 / wall_command_output_to_clipboard.py
Last active July 22, 2017 18:47
Use this python file to copy the command of wall output to clipboard. The sender needs to login into remote system and send the output he intends the receiver to receive in the wall command. The receiver needs to run this script, please input the credentials of the same server in which the sender has logged in, whenever the script receives the o…
'''
Use this python file to copy the command of wall output to clipboard. The sender needs to login into remote system and send the output he intends the receiver to receive
in the wall command. The receiver needs to run this script, please input the credentials of the same server in which the sender has logged in, whenever the script receives the output it gets copied into clipboard of the PC of the receiver. Would this shit really work?.
'''
from paramiko import SSHClient, AutoAddPolicy
import pyperclip
ssh = SSHClient()
ssh.set_missing_host_key_policy(AutoAddPolicy())
ssh.connect('IP_Adress', username='username', password='password', key_filename='path_to_key')
outdata, errdata = '', ''
@krishnachaitanya7
krishnachaitanya7 / quizlet_remove_mnemonics.py
Created December 31, 2016 12:36
It is helpful in making new set of words to learn in quizlet, by removing the mnemonics i have added
import pyperclip,re
final = re.sub(r'^mnemonic.*\n?', '', pyperclip.paste().encode('ascii','replace'), flags=re.MULTILINE)
pyperclip.copy(final)
print "No of words: %d" % len(final.split('\n'))
@krishnachaitanya7
krishnachaitanya7 / Enter_text_whenever_pressed_enter.js
Created October 6, 2016 20:55
This script can be modded to add some text whenever a key is pressed. DIY whatever satisfies you, you can change keycodes by replacing "13" and 'keyup' can be replaced by 'keypress' & 'keydown' events whichever satisfies your need
// ==UserScript==
// @name Enter "mnemonic" on pressing enter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://quizlet.com/*
// @grant none
// ==/UserScript==
@krishnachaitanya7
krishnachaitanya7 / Sentence_Copy_On_Select.js
Created October 6, 2016 20:52
Copy sentences from a website (website should be specified in @match). just select the sentence and its copied.
// ==UserScript==
// @name Dictionary.com Copy Sentences
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.dictionary.com/*
// @grant GM_setClipboard
// ==/UserScript==