Blog

  • GitHub-HandBook

    GitHub HandBook

    GitHub is a development platform for version control and collaboration. It allows you to host and manage your projects and work together on same projects from anywhere.

    Well let’s start with a few basics.

    Terminology

    Keyword Description
    Repository “Repo” for shortv is a folder for storing your codes, files, text files, image files, etc. It can be local folder on your computer, or a storage space on GitHub.
    Fork A copy of someone else’s project or repository. Forking makes it possible for you to freely experiment the project WITHOUT affecting the original project.
    Upstream The original repo or Project that you have forked

    Repositories Branches Commits Pull Requests

    It is basically a Version Control System which helps us to have a multiple versions of our project every point of time to avoid losing or overwriting it. If you are working together on the same projects then Git will help you to:

    • Save your codes online.
    • See what new changes are made by all developers
    • Discuss issues with other developers
    • Recovering deleted datas
    • Revert accidentally changed data.
    • Share and exchange code with other developers easily.
    • Backup your code easily to a remote server.
    • And Many more

    Getting Started

    Sign Up on GitHub

    Refer to this Link

    create a new branch
    Select New Repository
    • Upper right corner
    • Select New repository

    Create a Repository
    • Name it
    • Provide a Short description
    • Select Initializewith a README.

    BRANCH

    We use Branching to work on different versions of a repository at one time. The default BRANCH is named as MASTER. We create new branches which can be said as a copy of Master branch and we do our experiments there before committing them to master. Any changes done in your new branches will not be reflected in your master branch. But if someone made a change in your master branch then you could pull in those updates to your branch. When the code is ready, you can merge all of your branch into master.



    Create a New Brach
    • Go to your new repository
    • Drop down (branch: master)
    • Type a branch name
    • Select the blue branch box

    COMMIT

    Commits are basically saving your changes. For each commit you can add a commit message and a small description explaining the changes made so that other contributors will understand why you made the change. In short Commits prepares a history of your changes. Thus helping you to see your previous codes.



    Create Commit
    • Click the README.md file
    • Click the pencil to edit
    • Write something
    • Add a commit message
    • Add a description
    • Click Commit changes button.


    You have a MASTER Branch and DEMOEDITS Branch. These changes will be made to just the README file on your DEMOEDITS branch and not on your MASTER Branch.


    PULL REQUEST

    Now it’s time for pull request. You can open a pull request in your own repository and then merge it to your master branch. But mainly we use pull request to propose your changes to someone interested. If someone review your code they will pull in your contribution to their branches. You can easily figure out the differences of the content from both branches.



    Click the Pull Request tab
    Click New Pull Request


    In the Example Comparisons box,
    select your branch
    Compare with the Master Branch.


    click Create Pull Request button.


    Give a title and a brief
    description of your changes.


    Click Merge pull request
    Click Confirm Merge


    Delete your Branch

    Git and GitHub on Windows

    Download and install Git

    Search for Git Bash

    Type git –version


    Go to Desktop and create a folder “git”. Open the folder and right Click, select Git Bash Here

    Create a Respository Online. Follow instruction above
    Click Clone or Download
    Copy the URL

    git config –global user.name “Your Name”
    git config –global user.email “youremail@domain.com”
    git clone (Paste the URL)


    Go to the “git” folder and there you go. All files in your local folder

    Go inside the new folder. In my case its “GitHub-HandBook” and create a file “hello.txt”
    type cd “folder name”
    git add hello.txt
    git status
    git commit -m “(committed message)” “filename”
    git push -u origin master
    Provide your credentials
    There you go, Refresh your
    GitHub Online Account to see the new file



    Visit original content creator repository https://github.com/bhokloo/GitHub-HandBook
  • GitHub-HandBook

    GitHub HandBook

    GitHub is a development platform for version control and collaboration. It allows you to host and manage your projects and work together on same projects from anywhere.

    Well let’s start with a few basics.

    Terminology

    Keyword Description
    Repository “Repo” for shortv is a folder for storing your codes, files, text files, image files, etc. It can be local folder on your computer, or a storage space on GitHub.
    Fork A copy of someone else’s project or repository. Forking makes it possible for you to freely experiment the project WITHOUT affecting the original project.
    Upstream The original repo or Project that you have forked

    Repositories Branches Commits Pull Requests

    It is basically a Version Control System which helps us to have a multiple versions of our project every point of time to avoid losing or overwriting it. If you are working together on the same projects then Git will help you to:

    • Save your codes online.
    • See what new changes are made by all developers
    • Discuss issues with other developers
    • Recovering deleted datas
    • Revert accidentally changed data.
    • Share and exchange code with other developers easily.
    • Backup your code easily to a remote server.
    • And Many more

    Getting Started

    Sign Up on GitHub

    Refer to this Link

    create a new branch
    Select New Repository
    • Upper right corner
    • Select New repository

    Create a Repository
    • Name it
    • Provide a Short description
    • Select Initializewith a README.

    BRANCH

    We use Branching to work on different versions of a repository at one time. The default BRANCH is named as MASTER. We create new branches which can be said as a copy of Master branch and we do our experiments there before committing them to master. Any changes done in your new branches will not be reflected in your master branch. But if someone made a change in your master branch then you could pull in those updates to your branch. When the code is ready, you can merge all of your branch into master.



    Create a New Brach
    • Go to your new repository
    • Drop down (branch: master)
    • Type a branch name
    • Select the blue branch box

    COMMIT

    Commits are basically saving your changes. For each commit you can add a commit message and a small description explaining the changes made so that other contributors will understand why you made the change. In short Commits prepares a history of your changes. Thus helping you to see your previous codes.



    Create Commit
    • Click the README.md file
    • Click the pencil to edit
    • Write something
    • Add a commit message
    • Add a description
    • Click Commit changes button.


    You have a MASTER Branch and DEMOEDITS Branch. These changes will be made to just the README file on your DEMOEDITS branch and not on your MASTER Branch.


    PULL REQUEST

    Now it’s time for pull request. You can open a pull request in your own repository and then merge it to your master branch. But mainly we use pull request to propose your changes to someone interested. If someone review your code they will pull in your contribution to their branches. You can easily figure out the differences of the content from both branches.



    Click the Pull Request tab
    Click New Pull Request


    In the Example Comparisons box,
    select your branch
    Compare with the Master Branch.


    click Create Pull Request button.


    Give a title and a brief
    description of your changes.


    Click Merge pull request
    Click Confirm Merge


    Delete your Branch

    Git and GitHub on Windows

    Download and install Git

    Search for Git Bash

    Type git –version


    Go to Desktop and create a folder “git”. Open the folder and right Click, select Git Bash Here

    Create a Respository Online. Follow instruction above
    Click Clone or Download
    Copy the URL

    git config –global user.name “Your Name”
    git config –global user.email “youremail@domain.com”
    git clone (Paste the URL)


    Go to the “git” folder and there you go. All files in your local folder

    Go inside the new folder. In my case its “GitHub-HandBook” and create a file “hello.txt”
    type cd “folder name”
    git add hello.txt
    git status
    git commit -m “(committed message)” “filename”
    git push -u origin master
    Provide your credentials
    There you go, Refresh your
    GitHub Online Account to see the new file



    Visit original content creator repository https://github.com/bhokloo/GitHub-HandBook
  • Pledge

    Pledge

    A high performance and lightweight Bukkit packet tracking API for predicting when a server packet arrives at a client,
    using ping/pong and transaction packets.

    How does it work

    Minecraft uses the TCP network protocol to transfer data between the server and the client.
    TCP guarantees delivery of data and also guarantees that packets will be delivered in the same order in which they were sent.
    The Minecraft client immediately responds to a server ping or transaction packet after synchronizing it with the game thread.
    Note that this is different behaviour from keep-alive packets which are not synchronized with the game thread before being responded to.

    Knowing this we can send a ping or transaction packet before and after some data we want to track.
    This guarantees the client has processed the data between the responses for these packets.

    Getting Started

    Pledge works by sending ping or transaction packets to track data being received by a client.
    Several ways of achieving this are provided by Pledge.

    You can manually send pings to and receive pings from a client,
    or use a scheduler to send pings automatically at the start and end of the tick.

    For extra information, please check out the javadoc added to the API interfaces.

    Examples

    Sending and listening to pings

    public class ExamplePlugin extends JavaPlugin implements Listener {
        private Pledge pledge;
    
        @Override
        public void onEnable() {
            this.pledge = Pledge.getOrCreate(this); // Create or get when already registered to another plugin
            this.getServer().getPluginManager().registerEvents(this, this);
        }
    
        @EventHandler
        public void onPlayerJoin(PlayerJoinEvent event) {
            this.pledge.sendPing(event.getPlayer(), -1); // Send ping on player join
        }
    
        @EventHandler
        public void onPingSend(PingSendEvent event) {
            Bukkit.broadcastMessage("Sent ping: " + event.getId());
        }
    
        @EventHandler
        public void onPongReceive(PongReceiveEvent event) {
            Bukkit.broadcastMessage("Received pong: " + event.getId());
        }
    }

    Client Pinger (Scheduling)

    public class ExamplePlugin extends JavaPlugin implements ClientPingerListener {
        private Pledge pledge;
    
        @Override
        public void onEnable() {
            this.pledge = Pledge.getOrCreate(this); // Create or get when already registered to another plugin
            ClientPinger pinger = this.pledge.createPinger(ClientPingerOptions.range(-1, -200)); // Ping ids range from -1 to -200
            pinger.attach(this); // Attach listener to pinger
        }
    
        @Override
        public void onPingSendStart(Player player, int id) {
            Bukkit.broadcastMessage("Sent first ping in tick: " + id);
        }
    
        @Override
        public void onPingSendEnd(Player player, int id) {
            Bukkit.broadcastMessage("Sent second ping in tick: " + id);
        }
    
        @Override
        public void onPongReceiveStart(Player player, int id) {
            Bukkit.broadcastMessage("Received first pong of tick: " + id);
        }
    
        @Override
        public void onPongReceiveEnd(Player player, int id) {
            Bukkit.broadcastMessage("Received second pong of tick: " + id);
        }
    }

    Important notes

    Pledge only tracks packets when in play state.
    This is because ping or transaction packets are only available while in this state.

    Most plugins, even when modifying the netty pipeline, should have no conflicts with Pledge.
    Feel free to open an issue if an incompatibility is found.

    Dependency

    If you want to use this in your project, you can add it as a Maven dependency:

    <repositories>
      <repository>
        <id>pledge-repo</id>
        <url>https://raw.github.com/ThomasOM/Pledge/repository/</url>
      </repository>
    </repositories>
    
    <dependencies>
      <dependency>
        <groupId>dev.thomazz</groupId>
        <artifactId>pledge</artifactId>
        <version>3.6</version>
      </dependency>
    </dependencies>

    Visit original content creator repository
    https://github.com/ThomasOM/Pledge

  • yii2-queue

    Visit original content creator repository
    https://github.com/Mirocow/yii2-queue

  • server

    server

    Getting Started with Create React App

    This project was bootstrapped with Create React App.

    Available Scripts

    In the project directory, you can run:

    npm start

    Runs the app in the development mode.
    Open http://localhost:3000 to view it in your browser.

    The page will reload when you make changes.
    You may also see any lint errors in the console.

    npm test

    Launches the test runner in the interactive watch mode.
    See the section about running tests for more information.

    npm run build

    Builds the app for production to the build folder.
    It correctly bundles React in production mode and optimizes the build for the best performance.

    The build is minified and the filenames include the hashes.
    Your app is ready to be deployed!

    See the section about deployment for more information.

    npm run eject

    Note: this is a one-way operation. Once you eject, you can’t go back!

    If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

    Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

    You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

    Learn More

    You can learn more in the Create React App documentation.

    To learn React, check out the React documentation.

    Code Splitting

    This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

    Analyzing the Bundle Size

    This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

    Making a Progressive Web App

    This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

    Advanced Configuration

    This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

    Deployment

    This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

    npm run build fails to minify

    This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

    Visit original content creator repository
    https://github.com/benecia2/React-CRUD