Giter Site home page Giter Site logo

krvperera / config Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 83.39 MB

Contains all the configuration files I use to setup my dev environment.

Shell 34.04% Makefile 0.04% C 1.36% Python 48.56% Haskell 7.17% Emacs Lisp 6.81% Vim Script 2.03%
dotfiles orgmode spacevim xmonad-configuration zsh

config's Introduction

Hi My name is Rukshan Perera

Software Engineer (6+ yrs) back to Masters

I have joined the industry in 2017 after my BSc, in Computer Science and Engineering. After working in the industry for 6 years I am back at doing MSc, in Computer Science in Oulu university in Finland.

  • ๐ŸŒย  I'm based in Oulu, Finland
  • ๐Ÿ–ฅ๏ธย  See my portfolio at https://www.krvperera.com/
  • โœ‰๏ธย  You can contact me at [email protected]
  • ๐Ÿš€ย  I'm currently working on HdMoviesClub
  • ๐Ÿง ย  I'm learning Masters in Computer Science and Engineering, JS, Rust, Computer Engineering track in my masters
  • ๐Ÿคย  I'm open to collaborating on C++ projects
  • โšกย  I like Isekai, ๐Ÿงœโ€โ™€๏ธ Fantasy, Science ๐Ÿงฌ Fiction

Skills

CC++C#GitJavaJavaScriptPythonRustTypeScriptHTML5ReactBootstrapReduxMySQLPostgreSQLFirebase.NETArduinoBlenderDockerLinuxPyTorchFigma

Socials


๐Ÿ“• Latest Blog Posts

Links

Emojis Ugly Org Mode

Badges

My GitHub Stats

KRVPerera's GitHub stats

Top Languages


Support Me

config's People

Contributors

krvperera avatar

Watchers

 avatar  avatar

config's Issues

Create full automation script for macOS

Development

  • setup zshrc
  • install fonts
  • setup macvim
    • install macvim -full version
    • vim-plug installations
    • setup vimrc
    • update plugins

Installations

  • install programming languages
    • python
    • Ballerina
    • C++
    • rustlang
    • haskell
    • Java
  • Install programs
    • f.lux
    • spectacle
    • slack
    • github desktop
    • Blender
    • PureRef
    • Kindle
    • Helium
  • install IDEs
    • intellij idea
    • pycharm
    • atom
    • Android Studio
    • Brackets
    • VSCode

bColor make PS1 grow

At first PS1
\[\e]0;
In my aliases this is not included, so a script is needed to find \e like color changing codes and strip PS1 of them and add new color

DownLoadOrganizer code is tightly coupled

On MacOS you can decouple and run python scripts by Automator folder actions. Some python libraries are missing and code needs to be simple and mostly native.

Code must be organized to decouple to a standalone native program which can be extended to a FileSystemWatcher.

Can start here.

import os
import time

def createDir(directory):
    if not os.path.exists(directory):
        os.makedirs(directory)


class FolderOrganizer():
    trackingFolder = "/Users/rukshanp/Downloads"
    jpgFolder = "/Users/rukshanp/Pictures/downloaded"
    jarFolder = "/Users/rukshanp/Downloads/jars"
    setupFolder = "/Users/rukshanp/Downloads/SDKs"
    videosFolder = "/Users/rukshanp/Movies/downloaded"

    def __init__(self, trackingFolder):
        self.trackingFolder = trackingFolder
        createDir(self.jpgFolder)
        createDir(self.jarFolder)
        createDir(self.setupFolder)
        createDir(self.videosFolder)
        print("Created")


    def on_modified(self):
        for file in os.listdir(self.trackingFolder):
            if self.isImageFile(file):
                srcPath = self.trackingFolder + "/" + file
                newDestination = self.jpgFolder + "/" + file
                i = 0
                while os.path.isfile(newDestination):
                    newDestination = self.jpgFolder + \
                        "/new_file_" + str(i) + "__" + file
                    i = i + 1

                print("Moving {} to {}".format(srcPath, newDestination))

            elif self.isJarFile(file):
                srcPath = self.trackingFolder + "/" + file
                newDestination = self.jarFolder + "/" + file
                i = 0
                while os.path.isfile(newDestination):
                    newDestination = self.jarFolder + \
                        "/new_file_" + str(i) + "__" + file
                    i = i + 1

                print("Moving {} to {}".format(srcPath, newDestination))

            elif self.isSetupFile(file):
                srcPath = self.trackingFolder + "/" + file
                newDestination = self.setupFolder + "/" + file
                i = 0
                while os.path.isfile(newDestination):
                    newDestination = self.setupFolder + \
                        "/new_file_" + str(i) + "__" + file
                    i = i + 1

                print("Moving {} to {}".format(srcPath, newDestination))

            elif self.isVideoFile(file):
                srcPath = self.trackingFolder + "/" + file
                newDestination = self.videosFolder + "/" + file
                i = 0
                while os.path.isfile(newDestination):
                    newDestination = self.videosFolder + \
                        "/new_file_" + str(i) + "__" + file
                    i = i + 1

                print("Moving {} to {}".format(srcPath, newDestination))
            else:
                continue

            os.rename(srcPath, newDestination)

    def isImageFile(self, fileName):
        fileName = fileName.lower()
        if fileName.endswith(".jpg"):
            return True
        if fileName.endswith(".png"):
            return True
        return False

    def isJarFile(self, fileName):
        if fileName.endswith(".jar"):
            return True
        return False

    def isSetupFile(self, fileName):
        if fileName.endswith(".dmg"):
            return True
        if fileName.endswith(".iso"):
            return True
        if fileName.endswith(".app"):
            return True
        return False

    def isVideoFile(self, fileName):
        if fileName.endswith(".mp4"):
            return True
        return False


def main():
    downLoadsFolder = "/Users/rukshanp/Downloads"
    folderEventHandler = FolderOrganizer(downLoadsFolder)
    folderEventHandler.on_modified()


if __name__ == "__main__":
    main()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.