How to Restart a Remote Server Using Command Prompt

Launch command prompt (as administrator) and run the below command. User should have administrator permissions on the server.

   1: SHUTDOWN /r /f /t 0 /m \\<ServerName> /c "<Description>"

/r         Shutdown and restart the computer.

/f         Force running applications to close without forewarning users.

/t xxx     Set the time-out period before shutdown to xxx seconds.

The valid range is 0-600, with a default of 30.

/m \\computer Specify the target computer.

/c “comment” Comment on the reason for the restart or shutdown.

If there aren’t any issues the system will be restarted

   1: C:\Windows\system32>;SHUTDOWN /r /f /t 0 /m \\xyz /c "Hotfix Installation"

Modify the above script parameters appropriately to copy the files successfully!

Abstract Truth – (We Had) A Thing Lyrics

It was the summer of ’93, I was down
Did too much thinkin’. Too much drinkin’
Dishwater brown, tall and fine
You had a simple thing about ya,
Couldn’t live without ya
We took the D train for uptown, never looked down
But that was then, this is now,
You drove me insane, but I didn’t complain.

We had our thing now we’re done
But sometimes fuck just for fun
And it’s real cool, and it feels good
Or at least it should.

Get out on your own girl, that’s what they say
I’ve been through feminist statistics
A chick who said go holistic
They don’t know how sweet you sound when you say:
“Hey girl, what time you coming round?”

I’ve work like a slave for it
Turn all depraved for it
Swim shore to shore for it
Go out like a whore for it.
‘Cause when I’m down I’m doooooown
What time you want me round?

We had a thing now we’re done
But sometimes fuck just for fun
And it’s real cool, and it feels good
Or at least it should.

Do do doo do do do doo…

Check came, it was Sunday
Rent was due on Monday
He came home with no pay
I said I’ll go my way
But I fell deeply, completely
Since I don’t know when,
This happens over and over again.

Thing now we’re done
Fuck just for fun
And it’s real cool, and it feels good
Or at least it should

We had our thing now we’re done
But sometimes fuck just for fun
And it’s real cool, it feels good
Or at least it should, it should.

Thing and now we’re done, fuck me just for fun
It’s real real real cool.
And it feels good, or at least it should.
Thing and now we’re done,
Fuck me just for fun
Yeah yeah
Ohhh…

Cardi B – Ring ft. Kehlani

Ooh, ooh
Ring, ring, ring, ring
You don’t hit my line no more, oh, oh
You don’t make it ring, ring, ring, ring
I can’t keep this on the low
I want you to make it ring, ring, ring, ring
Should I call first? I can’t decide
I want to, but a bitch got pride
The switchin’ up shit is what I can’t fuck with
I’m feelin’ you but you hard to get in touch with
And you ain’t hit me up in a while
Actin’ like you don’t know what number to dial
You quit, then that’s it, I’ma throw in the towel
‘Cause a nigga only goin’ through what you allow
You don’t want this gun smoke
Learn to text with your nose if your thumb broke
I don’t care if we get into it and I stall on your ass
But I still wake up to missed calls from your ass, nigga
You don’t hit my line no more, oh, oh
You don’t make it ring, ring, ring, ring
I can’t keep this on the low
I want you to make it ring, ring, ring, ring
Nah, nigga now you gon’ have to call me (call me)
‘Cause I’m lookin’ at these messages, they all me (yeah)
Actin’ like they ain’t niggas that want me
Let another nigga in your spot, and you gon’ be hot nigga, coffee
You gon’ be sick to your, stomach
Hit me when you free, 1-800
It’s emergency, call me 911
‘Cause right now I’m out here tryna find someone
The ring on my phone, ring on my finger (brrr)
You actin’ like you ain’t tryna do either (yeah)
Was a good girl, watched me turn diva
Here goes my heart, I put it on speaker (oh)
You don’t hit my line no more, oh, oh
You don’t make it ring, ring, ring, ring
I can’t keep this on the low
I want you to make it ring, ring, ring, ring
You used to be on my line
On my tick all the time, yeah
Love it when you make me feel
Like you don’t mind when I ain’t got time for you
You know it don’t go to my head, I’m only arrogant in bed
I just love to know you wanna spend time with me instead
Now you all caught up, yeah
You all caught up and you done left me alone, yeah
You was all fed up
Ready for the next step, wanna be on your own
Said I just miss you, I just miss us, baby
All I know is
You don’t hit my line no more, oh, oh
You don’t make it ring, ring, ring, ring (you don’t make it ring, baby)
I can’t keep this on the low (yeah, yeah, oh)
I want you to make it ring, ring, ring, ring

Build a simple chat app with node.js and socket.io

To develop a real chat application, we have to put in place a real-time system of sending/receiving data. It will be impossible to do it with a relational database and Ajax calls. Thank’s to WebSocket and the library socket.io, it becomes easy.

You can follow this tutorial with my repo Github: https://github.com/ngrt/simpleChatApp

Technical stack

Here is the technical stack that you are using for this app :

WebSockets and socket.io

WebSockets is a protocol that allows a bilateral synchronous exchange between a client and a server.

In the classic web, a client requests to a server and a server responds sending it back the data. This system is impossible for a chat app.

In WebSockets, the server can send data to the client, but the client can too ! A WebSocket is a kind of communication pipe opened in two directions.

Socket.io is a library based on this protocol to make the use of WebSockets easier.

The Javascript mafia

Node.js is a Javascript back-end technology executed by the server as PHP, Ruby or Python. JavaScript uses events. Node.js keeps this particularity so it is easy to make asynchronous code.

Node.js comes with its own package manager: npm. It becomes easy to install, update, delete packages.

In this tutorial, we are going to use express.js. It’s a micro web framework based on node.js.

Set up of the development environnement

First of all, we need to configure our development environment.

The first thing to do is to start npm, our packages manager. To do so, open a new terminal, create a new repository which will contain our project, go in it and initialize npm:

$ mkdir createSimpleApp
$ cd createSimpleApp
$ npm init

npm will ask you for several information. If you want to skip that, press enter until the end. Now if you look at your project, we will find a new file : package.json. This file is listing all your dependencies.

So now, we are ready to install the packages needed to develop our chat app! We are going to need these packages:

  • express: the micro web application framework for node.js
  • Nodemon: a package that will detect any changes and restart our server. We will use it instead of the classic node command.
  • ejs: a template engine to simplify the production of HTML
  • socket.io: the famous package than manage WebSockets

To install them on our environment, it is super easy:

$ npm install --save package_name

I let you do the work for our 4 packages.

In your package.json, you could add this line into your scripts key:

“start”: “nodemon app”

With this line, you will be able to launch your app only with one commande using nodemon:

$ npm run start

Our environment is set up, we are ready to develop our application.

The chat app

Architecture of the app

First of all, we have to separate to part in the development of an application: the client part and the server part. We will have to develop the two parts to make our application up and running.

The server will be handled by node.js to make all the engineering (launch the packages and the website). This code will not be seen by the client.

The client part will be loaded on the computer of the client. He will have direct access to the files (html/css and js).

Server side:

We have to create the file app.js that will launch our server and all the packages.

This bunch of code is actually initializing our express app. If you go to http://localhost:3000, you will see a gentle message.

Now we just need to configure socket.io to be ready to deep dive into the WebSocket world.

Here, the io object will give us access to the socket.io library. io object is now listening to each connection to our app. Each time a new user is connecting, it will print out “New user connected” in our console.

If you try to reload our browser on localhost, nothing happened… Why ? Because our client side is not yet ready.

For the moment socket.io is only installed on the server part. Next, we will do the same work on the client side.

Client side

We just have to change a line in our app.js. In fact, we don’t want to display a « Hello world » message, but a really window with a chat box, inputs to write username/message and a send button. To do that we have to render an html file (which will be in our case an ejs file) when accessing the “/” root.

So you need to apply the render method to the res object.

In the other side, you will have to create a views folder, with an index.ejs file in it. The css will be in a public folder:

Our localhost:3000 will look like this :

So now that we have our basic template, we have to « install » socket.io on each client which will attempt to connect to our server. To do that, we have to import the socket.io library on the client side:

<script src=”https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js"></script>

The only way to work with socket.io is in a .js file. So at the end of your body add these lines:

<script src=”http://code.jquery.com/jquery-latest.min.js"></script>
<script src=”chat.js”></script>

And create a chat.js file in the public folder.

For the moment, just write this in it :

As you probably guessed, when the client will load this file, it will automatically connect and so create a new socket.

So when you refresh the page, we will see « New user connected » in your terminal.

Send and receive data

Username

When a user connects to our application, we will set him/her a default username, for example “anonymous”. To do that we have to go on the server side (app.js) and add a key to the socket. Actually, socket represent each client connected to our server.

We also will listen to any call made in « change_username ». If a message is sent to this event, the username will be changed.

On the client side, the goal is to do the opposite. Each time the button change username is clicked, the client will send an event with the new value.

Message

For the messages, it is the same principle!

chat.js:

app.js:

For the new_message event, you can see that we call the sockets property of io. It represents all the sockets connected. So this line will actually send a message to all the sockets. We want that to show a message sent by a user to all (and itself included).

Here is the final result of our chat app:

Little improvement

We can add a quick improvement to make our application more realistic. We will add the « XXX is typing… » message.

To do so, it is very easy.

After adding an HTML element in our index.ejs, we just add a jQuery event listener on typing and send a socket event named typing.

On the other side, we listen to typing and we broadcast a message. Broadcasting means sending a message to everyone else except for the socket that starts it.

Conclusion

See, this application is really easy to code. Before knowing the existence of WebSockets and socket.io, I thought this kind of application was really hard to code !

To improve this app, here is a list of functionalities to add:

  • A registration system with the possibility to chat in a one-to-one chatroom
  • History of all the conversations
  • Online/offline labels
  • Copy every features of WhatsApp !

Noufel Gouirhate

Producers and Writers on Cassper’s ‘Thuto’ album

Cassper Nyovest’s Thuto album was released in 2017 and  below are all the Producers and Writers:

1. Confused (feat. Goapele)

Produced by: Alie Keys
Written by: Cassper Nyovest, Goapele

2. I Wasn’t Ready For You

Produced by: Alie Keys
Written by: Cassper Nyovest, Tshego

3. As Karma Would Have It

Produced by: Alie Keys
Written by: Cassper Nyovest

4. Destiny (feat. Goapele)

Produced by: ANATII, Alie Keys, Cassper Nyovest
Written by: Cassper Nyovest, Guffy, Jabulani Ndaba (Malaika), Tshidi Mholo (Malaika), Bongani Nchang (Malaika)

5. Superman (feat. Tsepo Tshola)

Produced by: Alie Keys, Cassper Nyovest
Written by: Cassper Nyovest, Tsepo Tshola

6. Bentley Coupe

Produced by: Alie Keys, Cassper Nyovest
Written by: Cassper Nyovest

7. Nyuku

Produced by: Gobbla
Written by: Cassper Nyovest

8. We Living Good (feat. Tshego)

Produced by: Alie Keys, Cassper Nyovest
Written by: Cassper Nyovest, Tshego

9. Top Floor (LifeWasNeverTheSame)

Produced by: Alie Keys, Cassper Nyovest
Written by: Cassper Nyovest, DIDI Monsta

10. Top Shayela (feat. Nadia Nakai)

Produced by: Gobbla
Written by: Cassper Nyovest, Nadia Nakai (kandava)

11. Tito Mboweni

Produced by: Gemini Major
Written by: Cassper Nyovest

12. Touch The Sky

Produced by: Alie Keys
Written by: Dennis Ferrer, MIA Tittavilla, Cassper Nyovest

13. Ng’yekeleni (feat. Black Thought)

Produced by: Lae, Fenesse, Zero
Written by: Cassper Nyovest, Black Thought

14. Push Through The Pain

Produced by: Alie Keys
Written by: Cassper Nyovest

15. Baby Girl

Produced by: Dj Abza
Written by: Cassper Nyovest, Bunny Sigler, Kenneth Gamble, Cornell Haynes, Antoine Macon

16. Amen Hallelujah

Produced by: Gobbla
Written by: Cassper Nyovest