blog.x-e.ro / code: page 1 of 38

dbcli

sql :: command line database clients

dbcli as a curious code monkey, i find myself poking around a lot of different types of databases. and as a terminal junkie, i've used a bunch of different commandline tools to connect and interact with them.

in this post i wanna hightlight the dbcli project. it's a suite of db clients each written in python with a similar interface. clients support autocompletion, syntax highlighting, history, the project is opensource, and cross-platform.

i find myself perpetually using them for postgres, mysql, and sqlite but these have clients for ms-sql, redis, and more....

Read: dbcli »

atom editor linux install

linux :: running github's open source text editor

update: this post is outdated & atom sux

atom text editor linux screenshot

atom is a "hackable text editor for the 21st century" created by the team at github. it's designed to be customizable, but also usable without needing to edit a config file.

because we spend most of our day in a text editor, the single most important feature we wanted in an editor was extensibility. atom is built with the same open source technologies used by modern web browsers. at the core of atom is chromium, the open source project behind google chrome. with that comes all the power and innovation being developed for the web. but more importantly, extending atom is as simple as writing javascript and css, two languages used by millions of developers each day.

atom.io

Read: atom editor linux install »

cron jobs

linux :: automating tasks in linux

cron jobs are automated scripts that run at a specified date/time, or on a specified interval.

anything that can be executed in the terminal on the server can be run as a cron job (this includes commands, applications, scripts, etc).

crontab is the command used to create/view/modify/remove cron jobs.

  • crontab -l lists all scheduled jobs
  • crontab -e allows you to edit jobs
  • crontab -r will delete *all* your active jobs!

once the crontab file has been edited the cron daemon will automatically read it and update it's job que to match the file. you should see the message:
crontab: installing new crontab

Read: cron jobs »

git with the program

code :: source code management with git

git is a distributed revision control and source code management (SCM) system with an emphasis on speed. git was designed by linus torvalds, of linux fame, for managing the development of the kernel. every git working directory is a fully fledged repository, complete with revision tracking abilities independent of a network or centralized server. git is 100% open-source, freeware, and distributed under the GNU general public license v2.

Read: git with the program »

SQL select into statement

sql :: copy and swap database tables in MSSQL

have you ever had a database table that you needed to clone? you can use any number of convoluted methods such as: manually coping and pasting rows in the database manager, running lots of queries/stored procedures, or writing a script to cycle though each row copying data from one table to the next. all of these methods are inferior and far more complex then the method i'm going to show you.

introducing the select into query...
this method should be used if the table you want to clone exists, but the new table douse not. the select into query will create the new table for you, copying all the column names, properties, and data. if you want to make an exact clone of the table you can select * into the new table. but if you only want a few specific columns, you can declare only the ones you want. the syntax is elegantly simple...

SELECT *
INTO [new-table]
FROM [old-table]

Read: SQL select into statement »

metroid code breaker

demos :: NES game password generator

many years ago, a rom hacker by the name of SnowBro set out to gain an intuitive understanding of the inner workings of the software we lovingly refer to as metroid. using only the rom file, he was able to convert it into assembly code and learn exactly how the game engine worked.

armed with these files and the knowledge they contained, i set out to build a metroid password generator tool. being a scene kid, i have some experience with keygens already....

Read: metroid code breaker »

loading...

loading...