Skip to content

Instantly share code, notes, and snippets.

View ultimatecoder's full-sized avatar
🎯
Focusing

Jaysinh Shukla ultimatecoder

🎯
Focusing
View GitHub Profile
@ultimatecoder
ultimatecoder / Goyo vim documentation
Last active March 30, 2017 05:53
Goyo vim is distraction free writing plugin created by Junegunn Choi here https://github.com/junegunn/goyo.vim This is documentation file for that plugin. For adding this documentation file see the help given here http://vimhelp.appspot.com/vim_faq.txt.html#faq-4.5
*goyo_vim.txt* For Vim version 7.4 Last change: 2017 March 11
Reference Manual of goyo.vim plugin
==============================================================================
CONTENTS *Goyo-contents*
1.Introduction............................|GoyoIntro|
1.1.Screenshots.......................|GoyoScreenshots|
2.Functionality provided..................|GoyoFunctionality|
@ultimatecoder
ultimatecoder / brightness
Created March 30, 2017 12:01
Below script is written for managing brightness value of my computer. I have written this just to play with bash shell scripting. It is purly for learning purpose.
#!/bin/bash
path=/sys/class/backlight/radeon_bl0/brightness
display_usage() {
cat << EOF
Usage: brightness [-h] VALUE
Set the screen brightness according to given value.
-h Will display the help.
@ultimatecoder
ultimatecoder / backup
Created March 30, 2017 13:03
A automated backup script written just to learn Python better. This script is not developed for solving any type of production purpose. I developed this while I was learning Python for the first time.
#!/usr/bin/python3
'''Title : Automated Backup script.
Auther : Jaysinh Shukla
Date : 21-01-2014
Version : 0.4
OS : POSIX
Description : The script will make backup of all the files in zip formate. User is required to add the list of file names with their path in SourcePath List. User can also give additional paths of the files as command line arguments. It is to be noted that the argumetns provided will not create any entry in the parmenet list of the script. The program will create dicrectory named with current date and backup file named current time. If backup of day is created first time then the program will create new dirctory.
References :
@ultimatecoder
ultimatecoder / bhavbot.py
Last active March 30, 2017 13:17
This is the bot I have written for downloading and counting the data of National stock exchange. The bot is written when I was learning Python. The code is just to kept here for a reference and does not provide any garentee.
#! /usr/bin/python
"""
A bot National-Stock-Exchange-Robot. This is the robot for downloading and
counting the total number of lines of the csv file of the particular date. This
robot will remove days on which National Stock Exchange do not have the report.
User can also provide the list of dates separated by comma as
command line arguments.
$ ./BhavBot.py 2014-10-17 --holidays holiday.txt
@ultimatecoder
ultimatecoder / urls.txt
Created March 30, 2017 13:25
A webpage downloader I have written when I was learning Python. This will not solve any production purpose. It is just kept here for reference purpose.
http://www.inc.com/ss/jill-krasny/7-food-delivery-startups-watch?slide=1
http://techcrunch.com/tag/food/
http://www.npr.org/blogs/thesalt/2014/08/18/336877182/for-food-start-ups-incubators-help-dish-up-success
http://yourstory.com/2014/10/techsparks-hackathon-theme-mobile/
@ultimatecoder
ultimatecoder / .vimrc_current
Created March 30, 2017 13:36
This is custom vim configuration file especially for my personal use. The script here is for backup purpose.
"Current
set incsearch
set autoindent
set backup
set ruler
from collections import defaultdict
def product(a, b, c, d):
return [(a, b, c, d), (a, b, d, c), (b, a, c, d), (b, a, d, c)]
def count_hack(n):
results = []
sums = defaultdict(set)
def count_4_power(n):
results = []
for a in range(1, n+1):
for b in range(1, n+1):
for c in range(1, n+1):
for d in range(1, n+1):
if a ** 3 + b ** 3 == c ** 3 + d ** 3:
results.append((a, b, c, d))
return results
def count_order_n3(n):
results = []
for a in range(1, n+1):
for b in range(1, n+1):
for c in range(1, n+1):
d = a + b - c
if a ** 3 + b ** 3 == c ** 3 + d ** 3:
results.append((a, b, c, d))
return results
@ultimatecoder
ultimatecoder / gist:1b526b4512fb4cb2c9b1346afa489021
Created June 12, 2018 05:37
Failing logs of x11-drivers/xf86-video-virtualbox-5.1.36
This file has been truncated, but you can view the full file.
 * Package: x11-drivers/xf86-video-virtualbox-5.1.36
 * Repository: gentoo
 * Maintainer: polynomial-c@gentoo.org masterzorag@gmail.com
 * USE: abi_x86_64 amd64 dri elibc_glibc kernel_linux python_targets_python2_7 userland_GNU
 * FEATURES: preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking VirtualBox-5.1.36.tar.bz2 to /var/tmp/portage/x11-drivers/xf86-video-virtualbox-5.1.36/work
>>> Source unpacked in /var/tmp/portage/x11-drivers/xf86-video-virtualbox-5.1.36/work
>>> Preparing source in /var/tmp/portage/x11-drivers/xf86-video-virtualbox-5.1.36/work/VirtualBox-5.1.36 ...
* Applying xf86-video-virtualbox-5.1.24-Makefile.module.kms.patch ...