Author Archives: admimin

Canon ip2770 hasil print table bengkok tidak calibrate

Published by:

Awalnya dari pengaduan seseorang di kantor, kalau printer baru yang ada di sana hasil print nya aneh. Bengkok-bengkok. Termasuk ketika nge-print table. Yang mestine lurus. Alhasil sesudah cleaning-cleaning tidak berhasil lalu  intip-intip ke dalam, pita putihnya yang berada di belakang catridge ternyata agak hitam. Setelah baca disini

source : http://isniaceh.blogspot.co.id/2014/06/cara-memperbaiki-hasil-print-tabel.html

memang pita itu harusnya bersih. So akhirnya minta tissue sama temen dan dibersihkan. Setelah itu masalah pun berlalu.

virtualbox shared folder – another way mounting shared folder using samba

Published by:

my host is slackware.
the virtual machine is windows xp.
I am going to add the folder in my slackware into the windows using samba in the slackware.

first setting the samba in the slackware. I think I have another post about samba in this blog. Then in the virtualbox, set the network setting into two nic. The first nic as bridge adapter and the other as nat.

Later in the virtual machine, we will see the lan address of the bridge. Then set it manually to the same network address as host. If the host is 192.168.1.1 then the bridge is 192.168.1.2

Next, through the network browser file manager in windows, browse to 192.168.1.1, we will see the samba share right over there.

github – free repository – free safety box for your code

Published by:

Saya sudah mengenal github cukup lama, tapi karena awalnya bukan programer, jadi tidak terlalu tertarik menggunakannya. Nah sekarang saya nyemplung jadi programer, web programmer tepatnya. Jadi rasa-rasanya jiwa ini sudah tergelitik untuk menyimpan code-code hasil karya saya dan share ke orang yang membutuhkan. Github bisa menjadi salah satu sarananya.

Pertama, buat akun di github. jreng-jreng. Beres.
Di dashboard github buatlah New Repository. Berikan ‘nama” apa saja sesuai projek kita.Maka github akan memprint di layar komputer kita tentang bagaimana kita mengupload file-file code kita.

Nah disini pembelajaran di mulai. Saya menggunakan linux ubuntu untuk pekerjaan saya sehari-hari. Otomatis code saya ditulis di notebook ini. Dan kebetulan proyek pertama saya adalah proyek web programming, menggunakan engine xampp. File-filenya berada di /opt/lampp/htdocs/

Jadi saya akan meng-clone proyek saya disana ke github langsung. Kurang wise sih. Tapi menghemat space harddisk saya kalau saya buat direktori baru. Oke untuk caranya, setelah googling, saya menggunakan terminal/console.

cd /opt/lampp/htdocs/proyek
git init
git add *git commit -m “pesan atau keterangan tentang versi proyek saya”
git remote add origin https://github.com/sugi76/nama
git push -u origin master

Sewaktu proses push, maka akan tampil pertanyaan tentang username github dan passwordnya. Isikan saja. Jika berhasil, di github dashboard sudah terpampang list file dan directory proyek kita.

Nah pembelajaran satu lagi, setting git di /opt/lampp/htdocs/proyek sebaiknya jangan dihapus. Ini bermanfaat jika kita akan update file/ proyek kita ini. Saya nyesel juga karena saya menghapusnya. Jadi error.

Saya ulang lagi dari awal, tapi ketika hendak push, tetep error. Jadi harus menggunakan parameter force (-f)

git push -f origin master

Nah sekian.

Pop setting in gmail to another gmail account

Published by:

Ini ceritanya sedang menyatukan nafas dari banyak email ke satu email saja. Google menyediakan fasilitas akses pop akun, jadi bisa nerima semua email lain ke email yang ini. Baiklah anggaplah saya punya email A, jarang saya buka karena malas, yang sering saya buka adalah email B. Jadi saya mau supaya jika ada orang lain mengirim ke email A, akan saya terima di email B.

Nah setting pertama adalah mengaktifkan fitur pop ini di setting email google A. Ada kok langkah2nya. Habis itu tutuplah. Sekarang buka email B, masuk ke setting juga, pilih menu Account, pilih menu pop. Akan ada kotak dialog untuk mengisi settingnya. Ini juga bisa dibrowse dengan mudah.

Nah sebenarnya inti masalahnya adalah, email temen saya ga bisa verifikasi, pada kotak dialog menampilkan pesan

Server denied POP3 access for the given username and password.

Jadi apa yang sebenarnya terjadi? Ternyata sebelumnya beliau itu mencoba mengakses terus dengan cara yang salah sehingga akhirnya google memblok akun tersebut. Terbukti dari adanya email dari google di email A, yang menuntut dirinya memencet tombol Allow.

Kecurigaan kedua adalah ada captcha. Atau second verification something. Jujur saya tidak tahu dimana setting ini. Tapi menurut forum https://productforums.google.com/forum/#!topic/gmail/4ixXRg5lhz8 yang perlu dilakukan adalah mem-browse alamat seperti berikut :

https://www.google.com/a/<DOMAIN HERE>/UnlockCaptcha

Di monitor saya sih seperti tidak terjadi apa-apa. Tapi berimanlah bahwa prosesnya tersebut berhasil. Dan memang berhasil.

Ya sudah, case close.

Mass copy for backup in windows

Published by:

What I do love as a system administrator is backup things. Documents, picture, archieves, anything. And I always want to do it in a simple but powerful command prompt or console.

In microsoft there are two command available in the command prompt to do this.

First : xcopy
This is the syntax

xcopy /s /d *.doc source destination

source could be D: and destination could be E:
/s means create also the subdirectories but not empty one
/d means if there is a similar file in the destination, copy only if the source is newer

Second : robocopy
Microsoft said, this command will not be found in basic microsoft or home edition. Only in network windows or professional edition. I read the how to command, it is quite powerfull. It can copy over network through samba or something like \\192.168.xxx.xxx\destination. The syntax is :

robocopy source destination *.doc /s /xo /r:2

/s means create also the subdirectories but not empty one
/xo means if there is a similar file in the destination, copy only if the source is newer
/r:2 means the number or retry when the command try to access to denial directory or error directory

This is the full option for xcopy

Syntax

xcopySource [Destination] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g] [/d[:mm-dd-yyyy]] [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [{/a|/m}] [/n] [/o] [/x] [/exclude:file1[+[file2]][+[file3]] [{/y|/-y}] [/z]

Parameters

Source : Required. Specifies the location and names of the files you want to copy. This parameter must include either a drive or a path.

Destination : Specifies the destination of the files you want to copy. This parameter can include a drive letter and colon, a directory name, a file name, or a combination of these.

/w : Displays the following message and waits for your response before starting to copy files:

Press any key to begin copying file(s)

/p : Prompts you to confirm whether you want to create each destination file.

/c : Ignores errors.

/v : Verifies each file as it is written to the destination file to make sure that the destination files are identical to the source files.

/q : Suppresses the display of xcopy messages.

/f : Displays source and destination file names while copying.

/l : Displays a list of files that are to be copied.

/g : Creates decrypted destination files.

/d[:mm-dd-yyyy] : Copies source files changed on or after the specified date only. If you do not include a mm-dd-yyyy value, xcopy copies all Source files that are newer than existing Destination files. This command-line option allows you to update files that have changed.

/u : Copies files from Source that exist on Destination only.

/i : If Source is a directory or contains wildcards and Destination does not exist, xcopy assumes destination specifies a directory name and creates a new directory. Then, xcopycopies all specified files into the new directory. By default, xcopy prompts you to specify whether Destination is a file or a directory.

/s : Copies directories and subdirectories, unless they are empty. If you omit /s, xcopy works within a single directory.

/e : Copies all subdirectories, even if they are empty. Use /e with the /s and /t command-line options.

/t : Copies the subdirectory structure (that is, the tree) only, not files. To copy empty directories, you must include the /e command-line option.

/k : Copies files and retains the read-only attribute on destination files if present on the source files. By default, xcopy removes the read-only attribute.

/r : Copies read-only files.

/h : Copies files with hidden and system file attributes. By default, xcopy does not copy hidden or system files.

/a : Copies only source files that have their archive file attributes set. /a does not modify the archive file attribute of the source file. For information about how to set the archive file attribute by using attrib, see Related Topics.

/m : Copies source files that have their archive file attributes set. Unlike /a, /m turns off archive file attributes in the files that are specified in the source. For information about how to set the archive file attribute by using attrib, see Related Topics.

/n : Creates copies by using the NTFS short file or directory names. /n is required when you copy files or directories from an NTFS volume to a FAT volume or when the FAT file system naming convention (that is, 8.3 characters) is required on the destination file system. The destination file system can be FAT or NTFS.

/o : Copies file ownership and discretionary access control list (DACL) information.

/x : Copies file audit settings and system access control list (SACL) information (implies /o).

/exclude:filename1[+[filename2]][+[filename3]] : Specifies a list of files containing strings.

/y : Suppresses prompting to confirm that you want to overwrite an existing destination file.

/-y : Prompts to confirm that you want to overwrite an existing destination file.

/z : Copies over a network in restartable mode.

/? : Displays help at the command prompt.

This is the full option for robocopy

ROBOCOPY <source> <destination> [file…] [options]
<source> Source Directory (local or network path)
<destination> Destination Directory (local or network path) and
[file…] Specifies the file or files to be copied. You can use wildcard characters (* or ?), if you want. If the File parameter is not specified, *.* is used as the default value.

 

**Skip to the end of this document for more information on Robocopy Options and Switches .

Examples of Microsoft’s Robocopy Syntax

#1 Simple copy

To copy contents of C:\UserFolder to C:\FolderBackup:

Robocopy C:\UserFolder C:\FolderBackup

This is the simplest usage for Robocopy

#2 Copy all content including empty directory

To copy all contents including empty directories of SourceFolder to DestinationFolder:

Robocopy C:\SourceDir C:\DestDir /E

#3 List only

List only files larger than 32 MBytes(33553332 bytes) in size.

Robocopy.exe c:\sourceFolder d:\targetfolder /min:33553332 /l

Note: /l – will list files matching the criteria. if /l is omitted, files matching the criteria will be copied to the taget location

#4 Move files over 14 days old

Move files over 14 days old (note the MOVE option will fail if any files are open and locked).

ROBOCOPY C:\SourceFoldern D:\DestinationFolder /move /minage:14

Similarly you could use the below switches

  • /maxage: <N> Specifies the maximum file age (to exclude files older than N days or date).
  • /minage: <N>  Specifies the minimum file age (exclude files newer than N days or date).
  • /maxlad: <N> Specifies the maximum last access date (excludes files unused since N).
  • /minlad: <N> Specifies the minimum last access date (excludes files used since N) If N is less than 1900, N specifies the number of days. Otherwise, N specifies a date in the format YYYYMMDD

#5 Mirror a directory with subfolders incl. empty directories

/MIR is an option to ROBOCOPY where you mirror a directory tree with all the subfolders including the empty directories and you purge files and folders on the destination server that no longer exists in source.

ROBOCOPY \\sourceserver\share \\destinationserver\share /MIR

Or

ROBOCOPY source-drive:\DIR destination-drive:\DIR /MIR

#6 Mirror directories

The following command will mirror the directories using Robocopy:

Robocopy \\SourceServer\Share \\DestinationServer\Share /MIR /FFT /Z /XA:H /W:5

Explanation of the switches used:

  • /MIR specifies that Robocopy should mirror the source directory and the destination directory. Note that this will delete files at the destination if they were deleted at the source.
  • /FFT uses fat file timing instead of NTFS. This means the granularity is a bit less precise. For across-network share operations this seems to be much more reliable – just don’t rely on the file timings to be completely precise to the second.
  • /Z ensures Robocopy can resume the transfer of a large file in mid-file instead of restarting.
  • /XA:H makes Robocopy ignore hidden files, usually these will be system files that we’re not interested in.
  • /W:5 reduces the wait time between failures to 5 seconds instead of the 30 second default.

#7 Copy all changes

Use Robocopy to copy all changes to files in a directory called c:\data to a directory that contains the date, like data_20091124.  Create a batch file as follows.

@echo off
set day=%date:~0,2%
set month=%date:~3,2%
set year=%date:~6,4%
Robocopy "c:\data" "c:\backup\data\%day%-%month%-%year%\" /MAXAGE:1

#8 Mirror directory excl. deletion

To mirror the directory “C:\directory” to “\\server2\directory” excluding \\server2\directory\dir2″ from being deleted (since it isn’t present in C:\directory) use the following command:

Robocopy "C:\Folder" "\\Machine2\Folder" /MIR /XD  \\server2\ directory\dir2"

Robocopy can be setup as a simply Scheduled Task that runs daily, hourly, weekly etc. Note that Robocopy also contains a switch that will make Robocopy monitor the source for changes and invoke synchronization each time a configurable number of changes has been made. This may work in your scenario, but be aware that Robocopy will not just copy the changes, it will scan the complete directory structure just like a normal mirroring procedure. If there are a lot of files & directories, this may hamper performance.

#9 Copy permissions only

You have copied the contents from source to destination but now you made changes to the Security permissions at source. You wanted to copy only the permission changes and not data.

ROBOCOPY <Source> <Target> /E /Copy:S /IS /IT

Copy option have the following flags to use:

  • D Data
  • A Attributes
  • T Time stamps
  • S NTFS access control list (ACL)
  • O Owner information
  • U Auditing information

The default value for CopyFlags is DAT (data, attributes, and time stamps).

  • /IS – Includes the same files.
  • /IT – Includes “tweaked” files.

 

CPU Frequency Scaling Monitor cool down my Slackware notebook

Published by:

For years I wonder why my cpu is hotter when using linux. Cooler when using windows.
Tonight, accidentally I learn about cpu frequency. The hot comes from the hard work of the cpu. So if the system can lower it, it will cooler.

Check on which frequency the cpu is  working by command : cpufreq-info

If the result show to the max number then we need to lower it down.

Here is how

Add these line in /etc/rc.d/rc.local

cpufreq-set --cpu 0 --governor conservative
cpufreq-set --cpu 1 --governor conservative

then restart. Or do these command

echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "conservative" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

Next the computer reboot, check the cpufreq-info again. It will show the freq number to the lowest one.

And you know what, my notebook is no longer hot like before. The movie played by vlc also run smooth.

My cpufreq-info

cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0 1
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 10.0 us.
hardware limits: 1000 MHz – 2.17 GHz
available frequency steps: 2.17 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: conservative, ondemand, userspace
current policy: frequency should be within 1000 MHz and 2.17 GHz.
The governor “conservative” may decide which speed to use
within this range.
current CPU frequency is 1000 MHz.
analyzing CPU 1:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0 1
CPUs which need to have their frequency coordinated by software: 1
maximum transition latency: 10.0 us.
hardware limits: 1000 MHz – 2.17 GHz
available frequency steps: 2.17 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: conservative, ondemand, userspace
current policy: frequency should be within 1000 MHz and 2.17 GHz.
The governor “conservative” may decide which speed to use
within this range.
current CPU frequency is 1000 MHz.

IoT Maker Day – Bandung 24 September 2016

Published by:

Waktu pertama kali saya melihat postingan acara ini di komunitas iT Cianjur di facebook oleh seorang rekan, saya tidak terlalu mengerti apa yang akan terjadi di seminar ini. Cuma kok saya pernah membaca tentang IoT ini, sambil mikir-mikir dimana bacanya, ayo latihan cara spell IoT ini, jangan di baca ‘iyot’ tapi dibaca ‘ai yo ti’ – spell Inggris. Ah dasar orang sunda (kaya saya) suka keselimpet dan bacanya jadi iyot terus.

Karena kebetulan saya ada acara di Bandung dari Jumat, saya pikir ga ada salahnya ikut. Karena seminar ini pun gratis adanya. Acara ini di posting menggunakan aplikasi eventbrite. Jadi eniwey, hari sabtu 24 September 2016 hadirlah saya di ruang acara.

Seperti iklan yang diposting rekan saya di facebook tersebut, event ini memang event ketiga yang diadakan oleh Dycode Cominfotech Development. Setelah sebelumnya mengadakan event pertama di tempat yang sama, lalu kedua di Bandung Electronic Center berupa pameran, dan kali ini di ruang Bale Motekar Unpad Jalan Banda No. 40 Bandung.

Nah kembali ke topik semula, tentang apa yang terjadi di seminar ini, saya perlahan-lahan mulai mencoba mencerna apa yang coba disampaikan oleh host serta para pembicara dalam event ini. Awalnya saya pikir semacam promosi produk tapi ternyata tidak hanya itu (enya aya oge promosi nya kata saya mah, walau kata kang @Andri Yadi – dycodex, bukan jualan ini mah). Bagaimana bisa begitu?

Sesi pertama diisi oleh kang Fadhil CEO dari PT. Gravicode Multinovative Plexindo,

gravicode.com

Beliau membawakan sesi tentang apa itu IoT. Lengkap dengan segala contoh-contoh, alat-alat, device-device dan program-program, dan pokoknya lengkap. Buat saya yang awam, episode praktik ini sangat membawa saya ke awang-awang, sampe ngeces-ngeces tertarik buat mencoba. Praktik yang dibawakan oleh beliau adalah tentang .NET gadgeter. Misalnya tentang device yang bisa memancarkan data dengan menggunakan gelombang radio (LORA device) yang disimpan di belakang kelas dan diterima di bagian depan kelas. Device yang diperagakan adalah sensor cahaya.

 

Lalu sesi kedua, dari kang Andri Yadi, dari dycodex,

yang mana mesin dari acara ini. Beliau memberikan gambaran tentang asal muasal IoT, flashback tentang gerakan hacksterlife, gerakan maker di dunia dan di Indonesia. Yang kemudian me-launching Makestro

Beliau juga menerangkan tentang 10 falsafah hacksterlife. Yang isinya sayah lupa, ga sempet (ga mau sebenarnya) nyatet, mau di foto aja, eh tapi ternyata kejauhan. Ah siapa tau nanti muncul di twitter nya IoTBandung ya guys. Beneran tapi deklarasi ini menarik. Karena menyangkut masalah share share knowledge kita, jangan hanya berpikir tentang bisnis/ duit/ hak cipta, hal-hal demikian akan menyusul. Bayangkan tentang semangat share-nya aja, yang pemula (kaya saya) dapat belajar dengan baik, para expert berbagi tanpa batas tanpa ada yg disembunyikan. Dan jangan lupa, buat yang sudah belajar, dokumentasikan lagi, share lagi. Semangat share ini sangat menyentuh saya. Banget lah.

Berikutnya, makan siang. Mantaps, sangu nya haratisssss.

Next session adalah kang Rendra Toro dari Intel Edison, yang ternyata beliau juga salah satu software developer olx.co.id. Beliau membawakan sesi tentang Intel development board yang namanya Edison. Board kecil dengan prosesor Intel ini sangat powerful, apalagi untuk industri. Beliau memaparkan bagaimana board-board kecil ini sudah banyak dipakai dalam segala macam bidang. Misalnya saja dalam olahraga snowboard, device ini digunakan untuk merekam path snowboarder, sensor gerak, sensor berputar dsb. Lalu juga device seperti jam tangan, atau yang ditempel di kaki, untuk mengukur detak jantung, gerak langkah kaki, ketika seseorang olahraga.

Berikutnya, kembali kang Andri Yadi naik panggung lagi. Kali ini beliau mempraktekan kecanggihan beliau sebagai seorang ‘maker’. Beliau mengusung produk dycode, ESP8266 yang diberi nama EsPectro. Dengan berbagai demo yang bikin saya menganga kagum dan terinspirasi. Kecanggihan dev board Espectro juga bisa dilihat disini. Cocok buat pemula seperti saya untuk uji coba, ngopreks dsb. Walaupun harga ditampilkan dalam dollar amrik, tapi kalau di rupiahkan, sangat terjangkau. Cukup dengan nodong satu kali saja sudah kebeli. Eh tapi jangan nodong ya, cari cara yang positif-positif aja lah bray.

Sesi terakhir dibawakan oleh kang … (haduh lupa) dari Microsoft Azure, yang intinya mengenalkan Microsoft Azure sebagai platform cloud bagi IoT program. Dan beliau pun mengemukakan bahwa saat ini Microsoft mulai sangat serius untuk membantu para maker dengan program Azure-nya. Sayang sesi nya kurang lama, karena beliau kebetulan sedang padat acara dan terjebak macet di Pasteur.

Kalau dilihat Azure mirip seperti makestro itu loh. Kita bisa naro program kita disana, dan berkomunikasi dengan device kita yang sudah diprogram sebelumnya dengan sistem key, tag, tema dan sebagainya.

Dalam acara ini juga dimerikah oleh sponsor-sponsor yang sangat mendukung terhadap gerakan Maker atau IoT ini, yaitu perkakasku.com, digiware.com, serta Dilo.

Dan sebenarnya di ruangan lain, dycodex juga mengadakan acara untuk anak-anak level smp/sma hingga sd untuk belajar coding IoT. Keren kan? Cuma sayang karena saya konsen di ruang seminar jadi ga sempet ngintip2 ke ruang sebelah.

Oh iya kalau anda sempat, cek juga twitter IoT ini di sini @iotmakerday untuk informasi atau gambar2 yang lebih lengkap. Maklumlah da saya mah apa atuh, tapi intinya gerakan Maker ini perlu sekali dikembangkan dan dijamurkan di kota saya Cianjur. Mau ikut? mari kita bersenang-senang.

 

listing the directory only

Published by:

I am happy because I knew Linux I uncovered all the possible command in the terminal mode. Small program but it can be deadly.
I am not going to discuss about how deadly it is but just want to share how to list directory in terminal mode.

To list a file we simply using :
#ls -l
#ls -la
#ls -lha

Everything will be displayed on the screen. But if we want to display the directory instead of files, this is how
#ls -ld */
#tree -dL 1

The command tree without any option will display all the directory structure available in the current position to below.

Happy linuxing.