Category: tools

IPMI

Each server has a little ARM machine glued on the side with a dedicated ethernet port. Using standard protocols, as well as manufacturer extensions, we can do all sorts of useful things to the server remotely. Each machine’s IPMI card has an IP address that resolves from host “rcXXipmi”. Some of these include:

Powering on/off, resetting, warm reboots, software shutdowns, etc.

Accessing a serial-over-lan version of the console (can use this to configure BIOS parameters, as well as get a Linux console)

Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux. Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces to allow independent “containers” to run within a single Linux instance, avoiding the overhead of starting virtual machines.

If you would create a deployment system for PHP/MySQL web application with several external dependancies, across multiple *nix platforms usually you can use rsync or may be scp, git, and pear for dependencies and some custom scripts.

Capistrano to deploy project to remote servers and be able to rollback when screw up.
Capistrano is a nice ruby application that can perform pre and post-deploy functions like restarting webserver, busting cache, renaming files, running database migrations, with capistrano we can easily copy code from source ( control repository ) to production server.

Capistrano by itself isn’t enough to make my deployment complete, that why my capistrano script will runs composer on the app to gather dependencies.

First , you can get capistrano using gem like that:sudo gem install capistranosudo gem install capistrano-ext

Playing with my USB dongle that is a 3g modem, i felt the need to send message using this modem.
but i saw that it has no support to send message using AT command, well to check this use the AT+CSMS command before any shake.

In the case when you have a GSM/GPRS modem/mobile phone with full support of what we talk about before :
You can easily sending message using the great Kannel, or from scratch:
In this article we will focus on how to send message using AT command and we can resume this in five steps :
1. Initializing the modem
2. Setting SMSC
3. Storing the message into storage
4. Sending
5. Delete the message from storage

First of all, to interact with the device you need a serial tools like screen or may be minicom.
Well i recommend the use of screen when you work on pseudo devices :

Let’s connect to the device (ttyUSB0) using screen with a baud of 9600 :$ screen /dev/ttyUSB0 9600

1. Send the initialize strings :
AT
OK
ATZ
OK

2. Define the service center address as follow and verify that it is correct:
AT+CSCA=”+85290000000″,145

145 means that we deal with formatted address using typical ISDN/telephony numbering plan
(ITU E.164/E.163) and it is an international number.

3. In the fact if you may send a text messages to +85291234567, write the message first to storage area, as like as:
AT+CMGW=”+85291234567″,145,”STO UNSENT”Hello world

4. And finally you can now send the message, referenced with it index:
AT+CMSS=3

You can also do this if you rather to send it to mutli destinations:
AT+CMSS=3,”91234567″
AT+CMSS=3,”97777777″
AT+CMSS=3,”96666666″

Lastly, delete the message from storage area.
5. AT+CMGD=3

To read the first message indexed with 1 :
AT+CMGR=1

Also if you need to play or list all the message in the storage
AT+CMGL=”ALL”

To record a simple WAV sample from the microphone and save it to a file called `hello.wav’, install sox and type:$ rec hello.wav

this command begins an 8,000 Hz, monaural 8-bit WAV recording to the file `hello.wav’, and keeps recording until you interrupt it with C-c.
While the default is to make a low-fidelity recording — 8,000 Hz, monaural 8-bit samples — you can specify that a high-fidelity recording be made.
(But remember that high-fidelity recordings take up much more disk space.)

To make a stereo recording, use the `-c’ option to specify the number of channels, giving 2 as the argument. To make a 16-bit recording, give `w’ (“wide”) as the argument to the `-s’ (“sample size”) option.
Set the recording sample rate by giving the samples per second to use as an argument to the `-r’ option. For CD-quality audio at 44,100Hz, use `-r 44100′.
Finally, to record a file in a particular format, either give the name of the format as an argument to the `-f’ option, or use the traditional file name extension for that format in the output file name (see Sound File Formats).

To make a high-fidelity recording from the microphone and save it to a WAV-format file called `goodbye.wav’, type:$ rec -s w -c 2 -r 44100 goodbye.wav

When you try to push and you get this message that’s mean that someone else has changed after your last fetch.
Well in this case you have to incorporate their changes before you can add yours typically, you’ll want to rebase rather than merge and you’ll also want to test the joined version.

When you try to push and you get this message that’s mean that someone else has changed after your last fetch.
Well in this case you have to incorporate their changes before you can add yours typically, you’ll want to rebase rather than merge and you’ll also want to test the joined version.