SQLite format 3@ D\.K # b I  #0000 Uz //!tableblog_posts_backupblog_posts_backupCREATE TABLE "blog_posts_backup" ( "post_id" INTEGER NOT NULL DEFAULT '0' , "url" VARCHAR(50) NOT NULL , "title" VARCHAR(300) NOT NULL , "subtitle" VARCHAR(300) NOT NULL , "excerpt" VARCHAR(1000) NOT NULL , "content" TEXT NOT NULL , "comments" INTEGER NOT NULL , "date" INTEGER NOT NULL , "live" INTEGER NOT NULL )u!!5tableblog_postsblog_posts CREATE TABLE "blog_posts" ( "post_id" INTEGER NOT NULL , "url" VARCHAR(50) NOT NULL , "title" VARCHAR(300) NOT NULL , "subtitle" VARCHAR(300) NOT NULL , "excerpt" VARCHAR(1000) NOT NULL , "content" TEXT NOT NULL , "comments" INTEGER NOT NULL , "date" INTEGER NOT NULL , "live" INTEGER NOT NULL , PRIMARY KEY ("post_id") )] tableblog_metablog_metaCREATE TABLE "blog_meta" ( "meta_id" INTEGER NOT NULL , "blog_id" INTEGER NOT NULL , "meta_key" VARCHAR(100) NOT NULL , "meta_val" VARCHAR(1000) NOT NULL , PRIMARY KEY ("meta_id") )*jd++tableblog_categoriesblog_categoriesCREATE TABLE "blog_categories" ( "cat_id" INTEGER NOT NULL , "blog_cat_id" DOUBLE NOT NULL , "name" VARCHAR(30) NOT NULL , "url" VARCHAR(30) NOT NULL , PRIMARY KEY ("cat_id") )^ tableblog_tagsblog_tagsCREATE TABLE "blog_tags" ( "tag_id" INTEGER NOT NULL , "name" VARCHAR(100) NOT NULL , "url" VARCHAR(100) NOT NULL , "tag_count" INTEGER NOT NULL DEFAULT '0' , PRIMARY KEY ("tag_id") )ero" src="https://blog.x-e.ro/ui/img/blog/r4-ds.04.jpg" alt="R4-DS circuit board skin by xero" />

here's the circuit board theme i made for my r4-ds. download it here. the three buttons on the bottom left screen are the three main options of the r4. the first is ds emulations, this allows you to play archival copies of games. the center icon is the media player moonshell. it can play mp3s and a custom ds video codec. the final option is to boot to slot-2 (gameboy advance slot). this however will not play regular gba games (you have to remove the r4 to do that) this option is for booting legacy gba hackloaders.

R4-DS metroid prime pinball playback

playback of emulated games is flawless! the speed, the sounds, the graphics, everything looks exactly the same. even games with multiplayer functionality work perfectly. what's great about the r4 is yew can grab an 0-day rom of a new game and check it out. if it sux, you just delete the rom and forget about it. and if you find out it's awesome, then you can buy the game and feel assured what its gonna be all about. i think if nintendo allowed you to download demo roms directly to an sd card on the hardware to "try before you buy" people would go crazy, and the ds scene would explode.

samus glimmer in DS reflection

so now, you might be asking...

so xero, what can you play on this? and where can i get it?

public site is the devil's shadow. but if you google it, there are tons more. the other main application type is homebrew. and this is a very broad area. so, homebrew apps can be anything from data organizers, media players, emulators or homemade games. some of my favorites are:
Lameboy - gameboy/color emulator. (LSDJ anyone?)
jEnesisDS - sega genesis emulator)
DS Organize - calendar, address book, todo list, graphics app, file browser, calculator, irc client, webbrowser, rss feed reader.
MoonShell - do it all media player
SvSIP -VoIP/SIP client
glitchDS/cellsDS - a fun suite of graphical music composing tools
and there are tons of other retro game consoles emulated for the DS.
zophar's domain has a great list.

JWD^lob/main/zsh/.config/zsh/01-environment.zsh#L16">zsh environment file. the one tricky bit it getting your zshrc outta home. you need to export the ZDOTDIR globally somewhere like /etc/zsh/zshenv or /etc/zlogin that is globally sourced. other options like using systemd discussed here. i suggest running these two commands from my setup script to get things ready:

# export ZDOTDIR globally
echo 'export ZDOTDIR="$HOME"/.config/zsh' >>/etc/zsh/zshenv

# create directory skeleton
mkdir -p ~/.local/{bin,docs,cache,lib,share,src,state} ~/.local/state/zsh

i like to run these before cloning my dotfiles and using stow, to prevent these dirs from being symlinks.

neovim

with it's tight integration to the unix shell, vim has been my editor of choice for years. once you start to grok movements and operators you quickly begin manipulating, not just editing text files. and in the shell, everything is just text ;D these days i'm a full time neovim user. it's just better than normal vim at this point imho. using a community built embedded language like lua5 makes way more sense than a custom/proprietary one.

with my asliases e is $EDITOR and se is sudo $EDITOR

e ~dotfiles/README.md is nvim ~/.local/src/dotfiles/README.md

se /etc/hosts is sudo nvim /etc/hosts

you can also start neovim using ec or editor clean, to run nvim --cmd ":lua vim.g.noplugins=1". which is kinda like nvim --clean with the added bonus of still loading some sane defaults. i use this as my MANPAGER with +MAN! as well.

my neovim setup is written in lua, uses lazy.vim, and a bunch of plugins. you can enable/disable them selectivly from plugins.lua. here's the structure of configs:

~/.config/nvim
├── lua/
│   ├── utils/        --> shared helper functions
│   ├── plugins/
│   │   ├── alpha.lua --> each plugin has it's own config
│   │   ├── cmp.lua
│   │   ├── lsp/
│   │   │   ├── init.lua   --> main lsp setup logic
│   │   │   ├── remaps.lua --> lsp key-bindings
│   │   │   └── servers/
│   │   │       ├── bashls.lua --> language server specific configs
│   │   │       ├── luals.lua
│   │   │       └── etc...
│   │   ├── mason.lua
│   │   └── etc...
│   ├── ui.lua       --> ui related options
│   ├── commands.lua --> custom commands and key-bindings
│   ├── general.lua  --> general settings
│   └── plugins.lua  --> lazy.nvim entrypoint
├── nvim-logo*       --> k-rad ansi art
└── init.lua         --> calls other files

as of writing this, i use ~50 plugins and an average startup time of 90-150ms. plugin highlights include:

my leader key is set to , and you can checkout all my custom key-bindings by calling :WhichKey

previews

current setup

awesome ghosts

blizzard orb / cool mario

converge

solid gold

coils

U,X`ank">remorse. back in pre-modern internet days we had to dial up a BBS (bulletin board system) to chat or download files. over time, these systems became either mail/chat hubs or w4r3z distros. because of the questionable legality of some of these releases a login system was added to all BBS' (though many supported a "guest" login"). some had open registration while others were invite only.

acid underword bbs circa 2018

i've been a long time fan of text mode art. i got my first glimpse into that world back in the nineteen hundred and nineties, with groups like ACiD and remorse. back in pre-modern internet days we had to dial up a BBS (bulletin board system) to chat or download files. over time, these systems became either mail/chat hubs or w4r3z distros. because of the questionable legality of some of these releases a login system was added to all BBS' (though many supported a "guest" login"). some had open registration while others were invite only.

alcoholiday new files menu

the warez scene lead the way with .NFO files and FILE_ID.DIZ, these where text files accompanying the release describing them as well as the group (and often board) providing them. these files will adorned with the early scene ASCII art. but in this age, the terminal programs you used to call the boards utilized the ANSI character set. a larger set of 256 character inherited from IMB's CP437, it also contained special ANSI escape sequences that allowed for color text with the 16 foreground and 8 background colors provided by your shell. forward thinking ASCII artists used this power to create colorful works of art to adorn the BBS.

the scene pushed forward, and the people creating this art banded together and formed art collectives (or "crews") where they released their work in "artpacks". eventually these groups moved beyond BBS ad/screens/art and starting creating "art for art's sake". the height of this scene (strictly according to the number of packs released at that time) was 1997, with over 800 packs being released that year alone.

under the black flag bbs circa 2018

when it comes to the textmode scene, there were generally two groups based around hardware: the pc scene and the amiga scene. the amiga scene revolved around the commodore amiga. their releases are often seen more as "ascii art" since they were without color, and featured a number of different ANSI fonts. the most notable being topaz. most amiga ansi was created to accompany warez scene releases, so they were often not seen outside the underground. so members of the amiga crews would release "collys", which are a collection of works usually by a single artist. over time, the amiga scene has continued on using modern versions of their classic fonts and adding PC style colors to their work. while the PC scene still had heavy ties to the warez scene, many of the groups focused on BBS art and advertisements. because of the standard terminal size of 80 characters and a weird bug that corrupted the buffer if the last column was used, all ANSI art from this time period adhered to a strict 79col rule.

acid underworld bulletins screen

around this time, the modern internet was born. people began connecting to dial-up isp's to reach larger networks as apposed to dialing up individual computers. this pushed the BBS scene further underground than before. eventually, a new BBS standard was adopted allowing for these legacy systems to be reborn and reached once again via telnet (and eventually ssh). and that's where we are today.

acid underworld ansi gallery

while it's technically possible to use a standard unix {,like} terminal to connect to a modern bbs, it's better to use a tool specifically designed for BBS'ing. my personal tool of choice is syncterm. it runs on linux, {open,free,net}bsd, osx, and windows. it supports all connection methods including telnet, rlogin, ssh, RAW, zmodem, shell, and direct serial connections. it boasts copy/paste features along with username/password saving and auto-completion. and it's biggest feature, is support for automatically setting and switching between multiple SCENE FONTS!

ansi art uses a meta data format called "SAUCE", developed by the legends of ACiD productions. the sauce file, among other things, contains info about what font the art should be rendered in. this allows the sysops to use both PC and AMiGA style artwork on their boards and let's your client decided how to correctly render it.

bitsunrise games menu

while there are not nearly as many active boards today as there were back then, most of the ones that are still around are super high quality. containing custom artwork, door games, live chat, and cross-board communications.

my friend grisk of impure released this list of awesome active bbs' as of 2016. but i'll highlight some of my personal favorites:

since this is by and large and underground scene, it's historically been quite exclusive and difficult for people to "see". but with the thankless help of internet hoarders, there are now multiple textmode preservation networks. some simply offer direct download links, while others offer interactive galleries to view these works of art. i'd like to take a moment and thank maze for all his hard work on textmod.es. it's an amazing site hosting the artwork of multiple generations of scenesters.

acid underworld logoff screen

V  ;;CGG see_you_space_graff_boysee you space graff boycowboy bebop stencil canvas

see you space graff boya mixed media painting i made for a white elephant gift exchange

see you space graff boya mixed media painting i made for a white elephant gift exchange

ezE ##;) pB ##; photographyphotographycanon eos r & lightroom

i've been into digital photography lately. i sold some stuff, saved up, and purchased and used canon eos-r camera with two RF lenses the 35mm macro and a 16mm ultra wide. here's some random samples of my work: view more 2023 photos

i've been into digital photography lately. i sold some stuff, saved up, and purchased and used canon eos-r camera with two RF lenses the 35mm macro and a 16mm ultra wide. here's some random samples of my work:


i've also been super into editing my photos in adobe lightroom. i recently made a tutorial vlog about my personal editing style:

i've also been randomly publishing to my public lightroom gallery.

e/ li>
  • npm v1.4.x (packaged with node)
  • git
  • gnome keyring dev
  • install the dependencies:

    sudo apt-get install libgnome-keyring-dev python2.7 git git-core

    you can also install nodejs via apt-get, but as of right now it's not the most recent version. see the nodejs wiki for install instructions.

    setup python:
    to ensure that gyp uses python 2
    * personally i did not do this. since i don't have python 3 installed *

    npm config set python /usr/bin/python2 -g

    clone the repo & enter the directory:

    git clone https://github.com/atom/atom 
    cd atom

    now, there are three ways to actually build atom:

    #1. create the application at /tmp/atom-build/Atom

    script/build

    #2. installs command to /usr/local/bin/atom

    sudo script/grunt install

    #3. generate a .deb package at /tmp/atom-build

    script/grunt mkdeb

    i personally opted for the first one, just to see if it would work (but if i was going to do this again i'd chose option #2). after building (there were a number of warning in the build script) i moved the files from /tmp/atom-build/Atom to /opt/atom/ and symlinked it into my path.

    installing on ubuntu via ppa

    to install on ubuntu 14.04, 13.10 or 12.04, make sure the dependencies are met and run:

    sudo add-apt-repository ppa:webupd8team/atom 
    sudo apt-get update 
    sudo apt-get install atom

    installing on arch via the AUR

    archers should use their usual work-flow for the AUR: atom latest release | atom git

    installing on mac osx

    just download and run the official installer.

    installing on windows

    checkout the windows build instructions in the atom docs.

    initial impressions

    atom is quite fast (although load time is a bit slower sublime, but it's still beta). the ui is quite nice, and should be very familiar to sublime users. it seems like github's plan is to create a clone of sublime's features then build upon them, and it seems like they have almost all the bases covered already. the plugin system is quite nice. i actually think i like it a little better than sublime's package manager. but we'll see what happens when they have the vast number of packages sublime has. i like the very tight git integration into the gui (though i have already achieved this in sublime with plugins). they have a great number of supported syntaxes already. code completion has great coverage, although it seems a bit slow. themes are broken into two classes: ui and syntax. there are not many themes available yet, but they all seems pretty nice. my biggest gripe with atom themes is they chose LESS over SASS. but that's more of a personal preference thing for me than anything.

    i'm very excited to see where this application goes. since it's os / community backed i expect big things. but i'm not ready to uninstall sublime quite yet.


    sources

    Sj W=?q 55k+ gameboy_prosound_modgameboy prosound modconsole modification for better sound recording

    nintendo gameboy prosound mod

    today’s mod is for the original nintendo gameboy. if you want to get serious about chip tunes, whether your using lsdj or nanoloop, the sound quality of your instrument is a priority. the stock nintendo gameboy is equipped with a single headphone jack. and if you have ever tried recording anything from that, it sounds pretty bad. thus the prosound modification was invented to add a line out jack to the gameboy.

    nintendo gameboy prosound mod

    today’s mod is for the original nintendo gameboy. if you want to get serious about chip tunes, whether your using lsdj or nanoloop, the sound quality of your instrument is a priority. the stock nintendo gameboy is equipped with a single headphone jack. and if you have ever tried recording anything from that, it sounds pretty bad. thus the prosound modification was invented to add a line out jack to the gameboy. trash80 was first credited with this technique, but i will be using a mix of tutorial's published by both lameboy and animalstyle. this mod adds a new line-level-out jack to the device, while keeping the headphone functionality intact.

    tools - gameboy prosound mod

    things we'll need for the mod:

    triwing screwdriver - gameboy prosound modpittsburgh penguins #48 tyler kennedy and xero

    so the other day nina, will, and i went to a pittsburgh penguins hockey practice. i got to meet TK! (aka #48 tyler kennedy) i couldn’t believe that he was only a little bit taller than me, but he's carved out of solid rock! GO PENS! this is the last season for mellon arena so it was nice to get to visit the igloo one last time. 

    pittsburgh penguins #48 tyler kennedy and xero

    so the other day nina, will, and i went to a pittsburgh penguins hockey practice. i got to meet TK! (aka #48 tyler kennedy) i couldn’t believe that he was only a little bit taller than me, but he's carved out of solid rock! GO PENS! this is the last season for mellon arena so it was nice to get to visit the igloo one last time. 

    i took a whole bunch of pictures. check 'em out

    pittsburgh penguins igloo - mellon arena

    Icq us QAO  metroid_and_ghosts_n_goblins_fontstwo free video game fonts!metroid and ghosts n' goblins

    metroid font - NARPASSWORD00000 - fontvir.us

    i have been wanting to make a metroid font for a long time now.NARPASSWORD00000 is made from the classic nintendo NES game metroid's password screen. the font also includes some dingbatz made from the games sprites. but i decided to go the extra mile and create the rest of the full international character set. the fonts name is a reference to a special backdoor password hidden in the game. click here to download.

    metroid font - NARPASSWORD00000 - fontvir.us

    i have been wanting to make a metroid font for a long time now.NARPASSWORD00000 is made from the classic nintendo NES game metroid's password screen. the font also includes some dingbatz made from the games sprites. but i decided to go the extra mile and create the rest of the full international character set. the fonts name is a reference to a special backdoor password hidden in the game. click here to download

    namco font - ghouls, ghosts and goblins - fontvir.us

    my next new font is a capcom classic. ghouls ghosts and goblins made from sprites ripped directly from the NES rom chip. the game has had many incarnations over the years, like ghosts 'n goblins and ghouls 'n ghosts. so i named the font a combination of the two. this font contains the full set of A-Z, digits, special characters, and some 8bit dingbatz. click here to download.

    Ii  gt QE3eA vegan_chocolate_chip_cookie_recipevegan chocolate chip cookiesmy delicious recipe

    vegan chocolate chip cookie recipe

    start with a small container of margarine
    (like 7.5oz of promise or smart balance)

    blend in some sugar.
    i use about 1/3 brown sugar, 1/3 white sugar, and 1/2 a cup of confection [powdered] sugar.

    *optional*
    you can also use 1 table spoon of honey and/or agave nectar.

    stir until creamy.

    add 1 tea spoon vanilla and stir.
    add flour.
    (i like to mix 1/2 cup of whole wheat flour and 1+1/2 cup of white flour.)

    *NOTE*
    if you used honey / agave nectar you'll need and extra 1/2 cup of flour.

    add 1 tea spoon of salt.
    add 1 tea spoon of baking soda.
    add 1 tea spoon of baking powder.

    you want the dough to be stiff not sticky. if necessary, add more flour...

    vegan chocolate chip cookie recipe

    start with a small container of margarine
    (like 7.5oz of promise or smart balance)

    blend in some sugar.
    i use about 1/3 brown sugar, 1/3 white sugar, and 1/2 a cup of confection [powdered] sugar.

    *optional*
    you can also use 1 table spoon of honey and/or agave nectar.

    stir until creamy.

    add 1 tea spoon vanilla and stir.
    add flour.
    (i like to mix 1/2 cup of whole wheat flour and 1+1/2 cup of white flour.)

    *NOTE*
    if you used honey / agave nectar you'll need and extra 1/2 cup of flour.

    add 1 tea spoon of salt.
    add 1 tea spoon of baking soda.
    add 1 tea spoon of baking powder.

    you want the dough to be stiff not sticky. if necessary, add more flour.

    then stir in a small bag of semi-sweet chips.
    (i use the dark chocolate minis.)

    shape the dough into walnut sized balls.
    put on a cookie sheet and flatten slightly.
    bake at 350 degrees for 12-14 minutes.

    getting the dough the right consistency is crucial. if your first batch is coming out too thin or flat, you need to add more flour. the dough shouldn't stick to your hands when rolling then into balls. just keep adding a small amount of flour at a time until they don't feel so sticky.

    let cool.
    enjoy!

    I_ ZCCogs chiptune_albums_to_rock_outchiptune albums to rock outreleases by phlogiston, nonfinite, and starscream
    phlogiston - nectar

    nectar by phlogiston - nectar nectar by phlogiston - nectar is 2 EPs in one. part one, Croquel Adventure, continues in the chip-tune tradition of short, fun, pure NES songs. while part two, HEAT, transports you to an 80's vision of the distant future. the album is a tour through a vast dystopian cityscape where high-tech low-life roam the streets. and the lines between man and machine have been washed out.

    phlogiston - nectar nectar by phlogiston - nectar is 2 EPs in one. part one, Croquel Adventure, continues in the chip-tune tradition of short, fun, pure NES songs. while part two, HEAT, transports you to an 80's vision of the distant future. the album is a tour through a vast dystopian cityscape where high-tech low-life roam the streets. and the lines between man and machine have been washed out.


    nonfinite - southbridge southbridge by nonfinite - southbridge combines triumphant melodies with though provoking harmony and infection head-rocking beats. like northbridge, each track has a unique feel to it. and will peak your interest to the last bleep! you can listen to the entire album online but it's not free. 25% of all proceeds will benefit "chip-in" a group of 8-bit people trying to help out.


    starscream - future, and it doesnt work future, and it doesn't work by starscream - in the not so distant future awaits the election of the first third party candidate to the white house- they will hail from the space party, a political coalition founded by astrophysicists, former democrats and ex-NASA employees. starscream tells a tale of victory, science, and potentially catastrophic foreign policy.

    J4=8n remote machines.

    some of my favorite plugins include:

    gitgutter which shows a git diff in the 'gutter' (sign column). it shows whether each line has been added, modified, and where lines have been removed. you can also stage and revert individual hunks.

    in normal mode when selecting an opening brace or bracket { pressing the % key will move to it's matching closing character. the plugin matchit extends this base functionality adding support for matching by whole words, regular expressions, and other language specific items for html, latex and others.

    YouCompleteMe is a fast, as-you-type, fuzzy-search code completion engine. it's results hook into the omnicomplete system to provide semantic completions for many languages with the ability to configure to your needs.

    syntastic is a syntax checking plugin that runs files through user configured external linters and displays any resulting errors to the user. this can be done on demand, or automatically as files are saved.

    interface

    i personally like syntax highlighting. so setting syntax on is a must for me. depending on your terminal emulator vim can display from 16 to 256 colors. there are a lot of color schemes out there, i made my own called sourcerer. you add the files to ~/.vim/colors/ or put their contents directly in your .vimrc then set them with colorscheme sourcerer.

    line numbering can be another important tool when debugging. to display them use set number, or add a exclamation point as a negation set number! to disable them. another new option is set relativenumber which numbers the lines relative to the cursor rather than absolutely. you can jump to any line by entering it's number as a command. jump to line 10 with :10.

    another visual configuration is your statusbar. while the default is "satisfactory" to get the job done. most ricers configure a nicer one. you can write your own, but there is a lot to take into account. meta data about the file like name, type and encoding, vim's current mode, file modifiability, and other very complex things like placement if multiple buffer windows are visible. so most people use a plugin. powerline and airline are very popular but i prefer to use lightline to create a custom one. like others i use the background color of the filename section of the bar to represent the current mode. i also use fugitive to add git branch and status information to the bar.

    multiple files

    a buffer is the in-memory text of a file. you can have numerous buffers open at once. use ls to list the available ones. bn buffer next and bp buffer previous allow you to switch between them. bd buffer destroy will remove the current one.

    a window is a viewport of a buffer. use sp and vs to horizontally or vertically split the screen to display multiple buffers. pressing winc and a motion hjkl to move your focus. you can also use ^w and the arrow keys to move around. or press ^ww to cycle through them. you can resize windows with winc or ^w and <>-+= for left, right, up, down, and equally respectively. but since this is a single increment it's better to prefix it with a count like 30winc> or 30^w>.

    a tab is a collection of windows. tabe szechuan tofu. the nice lady behind the counter asked me if i wanted it steamed, fried… or both. at that moment my mind was blown. and the idea of double cooked tofu was born. it’s a simple recipe for anyone new to cooking tofu. this article is meant to teach you how to cook tofu, not flavor it. tofu is known for taking on the tastes of whatever it’s cooked with. after cooking the tofu in this method you can coat or sauté it in a sauce of your choice, or eat it plain. 

    things needed:
    1 block of tofu (i prefer firm or extra firm)
    steamer
    vegetable oil
    frying pan
    paper towels
    tongs (or metal slotted spoon)
    oven mitt

    pressing

    tofu comes packages in ‘water’. but it’s gross bean flavored water. the first step in preparing tofu is pressing this water out of your block of tofu. this step is necessary in *any method* of preparing tofu. and it can be easily overlooked by a first timer.

    tofu - block

    start by laying out 5 or 6 pieces of paper towel on a cutting board. position the tofu in a corner.

    tofu - wrapped

    wrap the tofu in the paper towels. try and have the thickest part of the paper towels on the bottom to collect maximum moisture.

    tofu - press

    put a stack of heavy books on top of the wrapped tofu. leave them there for 3-5 minutes. repeat this process 2 or 3 times until the paper towels are dry after pressing.

    cutting

    the method in which you cut your tofu is really up to you. but try and keep the pieces thin and a bit large. tofu shrinks when it's fried. here's my method:

    tofu - cut

    start by cutting the entire block in half.

    tofu - filet

    evenly filet each half of the block into 3 pieces, then stack them back on top of each other.

    tofu - triangles

    cut your rectangle in half short-ways. then cut and 'X' into each half.

    steaming

    this step is the real secret to double cooked tofu. we just removed the liquid from the tofu by pressing it. now we're going to add some back and cook the center of the tofu in the process. this makes for fuller, spongyer tofu.

    tofu - steamer

    place your tofu pieces in the steamer. make sure they're not touching.

    R4-DS the homebrew revolution

    the nintendo ds is an awesome portable gaming system. i have the ds lite, its thin, weights under a pound, has two super bright backlit screenJ !!\w ??Ye sql_select_into_statementSQL select into statementcopy 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]

    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]
    

    this is a great solution for cloning a table. it's fast and lightweight since it's all executed on the database end, not straddled between middleware.

    now here's another situation...
    let's say we have a simple web-form that is submitting 4 pieces of data: username, date, value1, and value2. this form has been collecting data for a long time, and all of a sudden you realize that somehow your save procedure has swapped the data for value1 and value2! some people might just dive into the table and start modifying rows. but i'm paranoid. i like to validate my SQL procedures before i destroy an entire table's worth of data. we can use the same clone table technique above to make a copy of the table, but we can go a step further and also swap the data in value1 and value2 in the same procedure.

    SELECT *
    INTO [new-table]
    FROM [old-table]
       
    DECLARE @temp AS decimal
    UPDATE [new-table]
    SET @temp=value1, value1=value2, value2=@temp
    

    basically we have 2 SQL statements in one here. the first will clone old-table into new-table. the second declares a temporary variable and uses the temp var to switch the data in value1 and value2 in the new-table.

    if you only need to switch values for a smaller portion of the dataset, say all rows with an id value less than a certain number, you can simply add a where clause to the end of your statement.

    SELECT *
    INTO [new-table]
    FROM [old-table]
       
    DECLARE @temp AS decimal
    UPDATE [new-table]
    SET @temp=value1, value1=value2, value2=@temp
    WHERE id < 806
    

    this will copy the entire table into the new one, but only swap the values for ids less than 806. all other values will be cloned exactly.

    J8hh2>

    for the most part, vi just works the way it's designed, while vim is highly configurable. many distributions include a basic config file, but user defined configurations are loaded from the .vimrc file in the home directory ~ of the user running the program. keep that in mind when running sudo vim or the more appropriate sudoedit (symlinks ftw). user configurations range from very simple vanilla ones to files hunderes of lines long brimming with comments, settings, custom key mappings, functions, plugins and the like. my vim guru taught me that when learning how to use vim you should start with a minimal configuration to learn how the editor itself works. then, when you gain a deeper understand, slowly begin to tweak it to your liking.

    it is common to first set nocompatible and enable vim's extended features, though in newer versions this is set automatically upon loading a user defined .vimrc file. other common settings include custom indentation sizes with shiftwidth, tabstop, and expandtab.

    you can also define your own commands to automate common tasks or quickly perform complex ones. one i use pretty often mapped to J is command J :%!python -mjson.tool this takes the contents of the current buffer and passes it to the python utility to pretty print a json file then reads back in it's results and replaces the current buffer with it's output.

    you can also remap commands and completely configure it to work exactly the way you like. i try not to use these because you tend to rely on them then get frustrated if they are not set or available in your current instance. early in my vim pilgrimage i was setting nnoremap ; : this allows you to prefix your ex commands with ; as opposed to the default :, i call it lazy shifting. but this would trip me up every time i was in vi. but since vim uses both ; and : things can get crazy quick. still, some swear by things like nnoremap <C-j> <C-w>j for faster and more semantic window movements. and vim gives you the freedom to do so.

    and this is just scratching the surface of what's possible. while i suggest looking at other peoples dotfiles and learning new things, i don't advise using someone else's exact .vimrc. you should understand, and want, every line in that file since it dictates exactly how your editor will function.

    since vim is configured by a simple text file, when it comes to editing on remote machines you can just use the default settings but it's trivial to add your own config file. you can copy+paste the contents manually, use a tool like curl or rsync to retrieve it and write it to a file curl -sL http://git.io/.vimrc-min-curl > ~/.vimrc, or if you are like me and keep your dotfiles under version control you can just do a git clone (and a sparse checkout if you only want one program's configs) and stow or symlink the files into place.

    extensible

    vim is endowed with a plugin system written in it's own language vimscript. it has a long history of working in different ways, but as of this writing vundle is the current standard. it allows you to install, remove, and configure plugins from your .vimrc file. the BundleInstall command will even clone all the necessary files from github or vim.org for you. plugins can be simple or very complex. the number of plugins and their complexity will effect load time, so keep it light. i often disable plugins when editing o 22 = 55Cg metroid_code_breakermetroid code breakerNES 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....

    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.

    building off the work SnowBro did many years ago, dirty McDingus disassembled the entire metroid code into nine different text files documenting the majority of it far more extensively than SnowBro had. there are descriptions for the title page, intro, ending, password, and music. the program can now be edited and reassembled using tools like ophis, making far more sophisticated rom hacks possible.

    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. and with the work of snobro's password explanations and dirty's raw code, i was able to get the job done. the tool is written in actionscript 3 using flex builder's mxml for the checkbox and dropdown ui. the rest of the graphics are game sprites i ripped and assembled. it also features my metroid password font NARPASSWORD. who's name is inspired by the debug password which was first discovered by snobro's research.

    view the metroid code breaker tool
    check out it's source code

    metroid

    update

    to celebrate this release, i've updated my website to a metroid theme!

    JWl carpal tunnel syndrome, so emacs is out. it also seems bloated to me, being that it's an editor as well as a client for mail, irc, news, web, etc. while vim is often available, sometimes only vi or micro-versions are available like nvi, the busybox tiny-vi clone, or the ATARI/UNIX/MS-DOS/OS2/QNX xvi implementation.

    vim

    i choose vi/vim the shell based, fast, extensible, multi-language editor focused just on editing code that's available on any *nix based operating system as well as other platforms. vi is a modal editor, meaning it works differently depending on the current mode. it operates in either insert mode where typing text appends it to the document or normal mode where keystrokes are interpreted as commands used to navigate and edit the document.

    your first challenge when using vim is learning the motions: h, j, k, l are used to move the cursor position up, down, left, and right. you can still use the arrow keys but vim masters will flame you saying things like: "you loose precious seconds (of your life) moving your hands from the home row to reach down for the arrows." like the motions, normal mode commands can be simple like w to jump forward a word. or more complex combinations of operators, counts and motions, for instance 2d3w deletes six words.

    vi style editors promote a keyboard focused workflow that doesn't rely on multiple simultaneous key presses or the mouse. which for shell users just makes sense. vim (Vi IMproved) is an extended version of the vi editor adding new modes like visual for highlighting and replace also known as overtype mode, among others. it also adds features like syntax highlighting, file completion and comparison (vimdiff), regular expressions, folding, compressed file editing, horizontal and vertical split or tabbed windows, multi-level branched undo/repo history, mouse support (for heretics) and a lot more.

    in normal mode ex commands are prefaced with a colon. depending on your settings, when you press : and start typing then press the tab key to activate the completion and suggestion engines. entering :w and pressing tab will give your suggestions like :wincmd, :write, :wq, and more. user defined functions must begin with a capital letter, and also will be available for completion. if you want to exit command input mode with out running anything press ^c (in this notation ^ is ctrl). when entering commands in a .vimrc file the colon notation is implied. for the rest of this article i will omit them from commands in that style. to get the master list of all ex commands enter help holy-grail.

    i think it's important to say: "vim is an editor, not an IDE". you can go wild extending vim with plugins and make vim into an IDE, but at it's core it's just an editor. use it how you like, but it's main goal is to edit text.

    help

    the mark of intelligence is not knowing everything, but knowing how to find the answers for yourself. my shell command history is littered with requests for man pages. i just ran vim .zhistory and %s/;man//gn, it yielded 15 results. so 1.5% of all my commands were asking for help. vim also has amazing documentation. enter the help command to view the help overview in a new buffer. the pages are just text so you navigate and search them as usual. you can search help with h pattern, if you set wildmenu tab completions will display a selectable list of suggestions.

    configurableLSDj keyboard

    so, making music for LSDj is fun. but after a while you start to wish you could “play" the gameboy software as a musical instrument as opposed to composing music in its tracker style interface. that's where the LSDj keyboard comes in. the idea is, the keyboard sends messages though the gameboy linkport to LSDj. the commands that can be sent vary from playing/stopping notes or chains or tables, un/muting channels, in/decreasing octaves, switching instruments, navigating screens, and more. 
    here's what the LSDj wiki says about the keyboard...

    LSDj keyboard

    so, making music for LSDj is fun. but after a while you start to wish you could “play" the gameboy software as a musical instrument as opposed to composing music in its tracker style interface. that's where the LSDj keyboard comes in. the idea is, the keyboard sends messages though the gameboy linkport to LSDJ. the commands that can be sent vary from playing/stopping notes or chains or tables, un/muting channels, in/decreasing octaves, switching instruments, navigating screens, and more. 
    here's what the LSDj wiki says about the keyboard.

    things we'll need for the mod:
    mini-din / ps2 keyboard
    gameboy link cable
    soldering iron
    solder
    flux
    wire stripper
    screw drivers
    heat-shrink tubing / electrical tape
    x-acto knife

    finding the right gameboy link cable:
    there are a few different types of gameboy link cables, in the most general of senses there are "classic" gameboy cables and gameboy "advance" cables. obviously we will need a classic cable. for this mod to work we will need to power the keyboard, so you'll need a powered gameboy link cable. you can cut off the cable end from a gameboy 4-player link adapter (model# DMG-07), like i did, or you can use the correct powered cable. otherwise you will need to add a +5v external power source. nonfinite sells both shell commands

  • file searching
  • random vim tips
  • learning & tutorials
  • wrap up
  • editor vs ide

    a text editor is a tool for editing plain text files. they have features like file and file system navigation, file io, modification, undo, search and replace, spelling and grammar checking, and more. but in this article we're talking about a type of editor referred to as source code editor. beyond the aforementioned functions their features include code detection, syntax highlighting, indentation and formatting, brace matching, code completion, etc.

    IDE is an acronym for integrated development environment, it's a suite of programs that work together in a "portable environment" that assists you in writing software. an editor is just one component of an IDE's toolchain. main features include things like code completion, code navigation, error checking, debugging, build automation, versioning, etc. most IDEs are designed for a specific language or related subset of them.

    being a long time programmer of a variety of languages i have used both at different times in my career. some "corporate" languages (cough microsoft! cough) like visual basic force you to use their IDE designed for their proprietary suite of tools. but many non-compiled and scripting languages let you write their code however you like. some editors like sublime text can be used for a multitude of languages while others like racket are designed to work with only one.

    if you sit around coding java all day, i'm sorry, then maybe using and full blown IDE like Eclipse, Android Studio, or IntelliJ is for you. but on any given day at my current job i will edit files in php, javascript/json, css/sass/stylus, shell scripts, markdown, config files, and a variety of others. i want an editor flexible enough to handle a wide variety of programming languages.

    simple

    if you adhere to the unix philosophy "dotadiw" or "Do One Thing and Do It Well", many IDE features break this separation of concerns. don't get me wrong, i understand that one of the most alluring attributes of an IDE is that you have your entire toolchain all in one place sharing the same user interface. but i subscribe to the unix as my ide mentality. as a shell user, your tools already work in the same common ui paradigm of text streams and files as persistent objects. i don't need my editor to understand the intricacies of any language, it just needs to know how to query and interpret or simply display the responses of external tools.

    everywhere

    another important factor for me is remote editing. even though we live in the future where your production website code is automatically deployed via post commit hooks in version control software, you still find yourself poking around and tweaking the code on remote machines. most *nix based/like operating systems come with ed, vi/vim, emacs, nano, and sometimes a few other editors. ed the standard editor is too terse and nano is too simple for me. i already feel like i have %y ''M' metroid_asciimetroid asciixero.nu metroid logo ascii style

    x-e.ro metroid ascii art

    x-e.ro metroid logo spoof ascii.
    view this post to see the full thing. it's double the size of the teaser image.

     .___.
    /  @  \
    \ @ @ /
     {'^'}
    
    
    
                                                 .                                            
                                               .*                                            
                                                                                                  
                                                                                                  
               .                                                               ,'                 
             :                                                                 .                  
                                                                                                  
                          .                                                   .___.               
                         .'            [ http://x-e.ro + Metroid Style ]    /  @  \              
                            .                                                \ @ @ /              
                            .                                                 {'^'}               
                                                                  .                               
                                                     ,'                                           
                                                                                                  
             =~ofar. john (aka jaze juce) is a native new yorker, who nina met at school. jaze is a rapper, a life guard, and all around man about town. we saw a lot of the city from in the car at night, which was awesome.

    NYC urban vs rural

    NYC manhattan skyline

    NYC up the fire escape

    day one we went to the guggenheim museum, they were camera-nazis so no photos from there. I don't know if we were there on an "off day" or something, but I honestly wasn't that impressed. But the building architecture was cool, like a parking garage meets modern adobe. on the way there we stopped in front of a random office building to buy fruit from a street vendor and found these giant hello kitty metal sculptures!!!!

    NYC metal hello kitty

    NYC metal hello kitty

    day two we went to the museum of modern art (MOMA) which was amazing! the place was 5 stories high, and was filled wall to wall with art! there was a lot of stuff i wasn't allowed to photograph, like the entire floor of picasso paintings/sculptures, or the HUGE salvador dali exhibit featured on the top floor! they had 250 of his paintings, tons of props, backdrops and other stuff from his films. and they were playing ALL the movies he made, including a DISNEY FILM he animated! 

    NYC MOMA

    NYC MOMA

    NYC MOMA

    NYC MOMA

    NYC MOMA

    after that we went to a museum of modern architecture and design. you’re really not supposed to take any photos there, but there were a few i just couldn't resist!

    stencil graffiti - fight club

    this year i decided to make xmas gifts for all my friends. part of me wanted to make something special for everyone, part of me just wanted to paint. i chose stencils as the medium for a few reasons. one, i have little experience with them. most of my graffiti has been hand drawn on the fly. some people in the 'graff scene' seem to think that stencils are cheating. but i don't see it that way. it's just another method in the same medium...

    stencil graffiti - fight club

    this year i decided to make xmas gifts for all my friends. part of me wanted to make something special for everyone, part of me just wanted to paint. i chose stencils as the medium for a few reasons. one, i have little experience with them. most of my graffiti has been hand drawn on the fly. some people in the 'graff scene' seem to think that stencils are cheating. but i don't see it that way. it's just another method in the same medium.

    after preparing you artwork (i did everything in photoshop) you will need to find the correct type of cardboard. stiff enough to not warp when wet with paint, but thin enough to be easy to cut. try and avoid the cardboard with the air bubbles in them. they are the most difficult to cut, and it's almost impossible to get very high detail with them. i like using the 'gift boxes' from retail stores. for these stencils i used boxes form dick's sporting goods, because they are a perfect thickness, and they are free. find yourself a good cutting surface. a desk you don't care about, a thin piece of wood, or one of those plastic drafting wheels. buy a new xacto knife or new blades for your existing one. this is one of the most important parts.

    the sharper the knife, the sharper the image.

    tape down your design to the cardboard and start cutting. take your time. and remember to follow the one rule of stencils: do not leave islands. by that i mean none of your design elements can be floating in the middle of the image. remember your entire design is cut in negative space on the cardboard. it's a hole or a series of them. so if there needs to be some detail within ones of these holes, the detail part must be bridged to the rest of the stencil.

    stencil graffiti - clockwork orange cut

    stencil graffiti - scraps

    after your stencils are ready to go it's time to prep your painting area. i prefer to paint outside, but since it's winter i had to use the garage with the door part way open. whSPh="710" height="180" />

    the triwing screw-driver is an integral part of this mod. nintendo uses a nonstandard screw on the 6 found on the outside of the case. but all the screws on the inside of the gameboy are a normal mini-philips head. i got my triwing on ebay for like $2.00, but you can get them other places if you look.

    exposed gameboy guts - gameboy prosound mod

    step one is to remove the screws. like i said before, there are six triwings on the back of the DMG. four are visible, and two are hidden under the batter compartment. make sure you don't loose the screws, or you will have to replace them with regular minis. but philips that small can be difficult to find.

    pull the ribbon cable - gameboy prosound mod

    now you need to disconnect the display cable. BE VERY CAREFUL! the ribbon cable that connects the dot matrix display to the gamboy's motherboard is very thin. the cable has minimal metal on the leads at the end. so if you scrape any of it off by pulling it out too hard or at a strange angle you can expect some dead pixels. just pull it straight down.

    two halves - gameboy prosound mod

    now take a moment to check out the guts of the gameboy. pretty cool. in the image above you can see the 3 points on the board we're going to be soldering two. check out the wiring diagram.

    clean everything - gameboy prosound mod

    the next step is optional. but its normally necessary. clean everything up. all you need is the highest percent alcohol you can get (i use 98%) and some cue-tips. get into those little recessed areas and clean out any dust or grime that may be in there. make sure you do the batter terminals too, especially if they have any corrosion on them. that process may require paper towels and some extra elbow grease.

    disconnect the audio daughterboard - gameboy prosound mod

    to fix the jack into the case you'll need to made a little more room. use a mini-philips head screw-drivedChild(label); init3D(); connection=new NetConnection(); connection.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler); connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityErrorHandler); connection.connect(null); } private function netStatusHandler(evt:NetStatusEvent):void { switch (evt.info.code) { case "NetConnection.Connect.Success": stream = new NetStream(connection); stream.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler); stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR,asyncErrorHandler); video = new Video(); video.attachNetStream(stream); stream.play("lupinIII-s2e002-buns.guns.and.fun.in.the.sun.flv"); label.htmlText ="x-e.ro presents... \n lupin the 3d\n buns guns and fun in the sun"; break; case "NetStream.Play.StreamNotFound": label.text="flv not found..."; break; case "NetStream.Play.Stop": //loop video stream.seek(0); break; } } // _______________________________________________________________________ // event handlers private function asyncErrorHandler(evt:AsyncErrorEvent):void { } private function securityErrorHandler(evt:SecurityErrorEvent):void { label.text="security error..."; } // _______________________________________________________________________ // init3D private function init3D():void { this.container = new Sprite(); addChild(this.container); this.container.x = this.stage.stageWidth / 2; this.container.y = this.stage.stageHeight / 2; scene = new MovieScene3D( container ); camera = new Camera3D(); camera.z = -planeSize; camera.focus = 1000; camera.zoom = 1; bmpData = new BitmapData(TEXTURE_W,TEXTURE_H,false,0xff0000); material = new BitmapMaterial(bmpData); material.oneSide = true; planeObj = scene.addChild( new Cube( material, planeSize, planeSize, planeSize, segment, segment, segment) ); } // _______________________________________________________________________ // loop3d private function loop3D( event:Event ):void { valx -= 0.2; valy -= 0.5; planeObj.rotationY = valx; planeObj.rotationX = 35; video.attachNetStream(null); bmpData.draw(video); video.attachNetStream(stream); var filters:Array = new Array; filters.push(new GlowFilter(0xFFFFFF, 1, 10, 10, 10, 1)); filters.push(new DropShadowFilter(70, 55, 0x000000, 0.5, 9, 9, 1, BitmapFilterQuality.HIGH)); /* var blur:Number = 10*Math.sin( (++count/25) ); if(blur > 0){ filters.push(new BlurFilter(blur,blur,BitmapFilterQuality.HIGH)); } */ planeObj.container.filters = filters; this.scene.renderCamera( camera ); } // _______________________________________________________________________ // onStageResize private function onStageResize(event:Event):void { this.container.x = this.stage.stageWidth / 2; this.container.y = this.stage.stageHeight / 2; } }

    p.s. happy birthday to me!

    F W^{ 11A7 double_cooked_tofudouble cooked tofusteamed and fried goodness

    tofu - double-cooked

    one day i walked into an unfamiliar chinese restaurant and ordered szechuan tofu. the nice lady behind the counter asked me if i wanted it steamed, fried... or both. at that moment my mind was blown. and the idea of double cooked tofu was born. it’s a simple recipe for anyone new to cooking tofu. this article is meant to teach you how to cook tofu, not flavor it. tofu is known for taking on the tastes of whatever it’s cooked with. after cooking the tofu in this method you can coat or sauté it in a sauce of your choice, or eat it plain.

    one day i walked into an unfamiliar chinese restaurant and ordered i| 55K)I git_with_the_programgit with the programsource 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.


    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.

    why use git?

    speed and performance.
    git is very fast. nearly all operations are preformed locally, giving it a huge speed advantage over other centralized systems which constantly have to communicate with an external server. git handles large repositories very well with is simple, yet very effective, design. and it's programmed in C, which reduces the run-time overhead of other higher level programming languages.

    complete history.
    every git repository, whether created locally or cloned from a remote location, contains its entire history. once you have a copy of the repository you can move forward and backward in time from the bleeding edge to the initial commit. if you make a few mistakes, introduce some new bug, or just want to reset to a previous state, your justxerminal.

    sound advice

    one evening i had a lengthy conversion with my friend matt burdine, a long time linux user. he convinced me that there was nothing to loose and give it a try. if i dual booted, i could have the best of both worlds, and he was right.

    my first step what to decide which distro to choose. in my research, i discovered there were a few main "flavors" of linux and a many distributions based on them. each having their own goals and opinions on how an OS should operate. i decided on debian, one of the main players, with a modern/active development community, lots of FLOSS/FOSS software packages, and many distros to choose from. this lead me to distrowatch, a great site that gives you all kinds of information about the most popular linux distros. based on many reviews i selected linux mint with the cinnamon desktop. at the time, a new version had just been released. mint was a real eye opener. i realized how much of a fully fledged operating system linux was. after a month or so, i was rarely booting into my windows partition anymore. mint helped me learn, from a very high level, how linux worked. and to be honest, it was extremely similar to windows in many respects. which was one of my biggest issues with mint. i was switching to linux to leave the windows world, not to just find a free clone of it.

    distrohoppers anonymous

    this lead me to the heaven/hell that is distrohopping, switching between various linux distributions like an addiction. this practice has it's pros an cons. test driving multiple systems gives you a great overview of the terrain. quickly helping you to decide which you like, and which you don't. setting up a separate home partition, allows you to use your personal files on any of the distros you install. but this rapidly consumes all the space on your hard drive(s) by having to install (some of) the same software on each. for the next few months i had a new version on linux on my testing partitions ever week. i experimented with a number of ubuntu variants like kubuntu, xubuntu, lubuntu, etc. i used centos, elementary, puppy, fedora (redhat), netrunner, manjaro, backtrack (kali), and finally crunchbang.

    *note*
    there are two notable distros missing from the aforementioned list. ubuntu proper and archlinux. when first learning about linux i was obviously, digitally, acquainted with richard stallman, the founder of the free software foundation and GNU. i read an article he wrote about ubuntu's problems being backed by a corporation, and basically install spyware on everyone's machines. it made a lot of sense. and i figured if they were putting stuff like that into the source, what else is in there/will they add? it dissuaded me from using it. arch linux, on the other hand, is a DIY linux distro targeting proficient *nix users, offering tons of great software, build scripts, user repos, etc, but little in the way of help or support. archers are expected to maintain their own systems, work through and solve their own problems when issues occur. at this point in time, i do not feel that i am ready for that. but hopefully some day :D

    crunchbang

    crunchbang

    i had seen the write up about #! (pronounced crunch bang) on distrowatch when waldorf was first released, and was immediately intrigued. it's based on debian stable, which i still feel is one of the strongest linux flavors, and featured the lightweight openbox window manager. after installing i was taken back by how minimal it's GUI was. no desktop environment, just a WM (window manager) and a rock-solid toolkit. many of the components of #! are from the XFCE project, which i was familiar with from some other distros i tired. after a few days i realized how unnecessary a DE (desktop environment) was for my purposes. my goal was to live in the command line, and i was doing just that. but when the moment arises that you need a file manager, thunar is there to help you out. thunar is a beautiful, bare minimum, file manager. you can visually explore the file system, move files around, have it suggest which applications you should use to open files with, etc. some other notable applications that come with #! are nm-applet, a network manager which makes connecting to wired/wifi/vpn networks a breeze. gparted, a GUI disk partitioning tool, and a/xrandr a dead simple screen resolution configuration tool.

    but one of #!'s strongest points are the forums. it's a great community of friendly, insightful, intelligent individuals helping new users solve problems. the vast majority of my questions were solved by simply searching. most n00b questions have already been answered, many with multiple suggestions and updates as things change. the forums are also a "direct" link with other users and developers. they have posts asking the community for suggestions for new releases, posts about new software, and other topics related to the linux world. but this community is not only made up of #! users, there are many who use debian proper, or other debian variants, archers, even a few ubuntu users.

    dot files

    like many other linux users i keep a git repo of my dotfiles, the ui configuration files that make my personal linux system look and act the way it does. you can check them out on my git server or on github.

    the voyage continues

    it's now been a year since i embarked on my linux journey and it's far from over. i have long since deleted my windows partition, and have never looked back. that's partially thanx to wine, a tool that allows you to run windows software in linux. and partially due to the great free software available to linux users. linux gives you, the user, the freedom to use your machine the way you want it. it's open nature allows you to tweak ever minute detail of your system. yes allows, unlike windows which i was constantly hacking part to change things, which inevitably leads to system instability and/or lack of security.

    i highly suggest giving linux a chance. it does have a learning curve, but how steep is based on which distro you select. mint and ubuntu are very windows-esque, and thus have a low barrier to entry. but "power-users", like myself, can choose to dive a deeply as you desire. linux is what you make it.

    S=?trong>
    just because you cloned from one repo doesn't mean you're tied to only one. you can add as many remotes as you want so you can pull/push from any/all of them.
    git remote show
    will list all the remotes for your working repository.
    use the -v (verbose) flag for additional information
    git remote -v show

    adding a new remote
    git remote add (name) (url)
    to view info about a remote
    git remote show (name)

    a note about subversion

    lots of people love svn and refuse to stop using it. most versions of git come packaged with the git-svn command (if it's not you can download it separately with the same package manager you used to get git. make sure you also have all the required curl bindings.) this will allow you to use git on a subversion repo. and the best part is, the svn users have no idea you're doing it! the git-svn command will convert all your git commands to svn commands when working with the remote repository. for all your local work, use git as normal. let them live in there "little subversion world", and you can live in the future with us using git ;D

    when cloning an svn repository use clone
    git-svn clone (url)
    then use git as normal, add commit, branch, etc. then when you're done, use the dcommit command. this will take all your git commits and package them as svn commits.
    git-svn dcommit
    if you want to pull from the svn repo use the rebase command
    git-svn rebase
    this will take all the changes from the remote svn and apply them one at a time into your local git-svn repo. by using the rebase command this will create a cleaner git history in your repo and allow for a simpler svn syncing.

    public git hosting

    there are many free/pay sites online to host git repos. most of the free plans focus on open-source projects, and thus are public. if you want a private repo you're more than likely going to have to pay.
    here's a list of some of the most popular git hosting sites:

    sources (giving credit where credit is due)

    everything in this post i learned from using git and reading about it. the following resources are both my citations for this article and a great wealth of knowledge for learning more about git (this article only scratches the surface).

    P~y flag to use interactive mode
    git rebase -i dev

    rebasing changes history!
    when rebasing you abandon existing commits and create new ones. although the new commits a very similar they are still viewed differently by git. so, a rule of thumb in the git community is to never rebase commits that you have already pushed to a public repo. the other people working on the project will be very annoyed, when pushing any changes they might have introduced to the branch you rebased will now be unavailable, they will have to rebase their repositories to match then apply their own changes.

    stashing

    git stash will save your uncommitted changes and remove them from the repo. this works almost like a clipboard. if you're working on something and a huge problem pops up. you can stash you changes, fix the crucal bug, commit your fix, then unstash and get back to what you were working on.
    git stash "message"
    git stash apply (stash id)
    cleaning up the stash (removes everything)
    git stash clear

    remote repositories

    so far all of the commands i've talked about are available offline. but let's talk about working with git over the internet. git can work over a few protocols: HTTP, HTTPS, and SSH.

    cloning
    to copying a git repository from an external site use clone
    git clone (repo url)
    git clone http://git.x-e.ro:open_qoob

    by default the name of the server you have cloned from is called origin.
    if you use the branch command again with the -a flag (all) you can see remote branches as well
    git branch -a

    so if you make some changes to your local clone of the repo, you can send it back to the server with the push command. you can optionally use a branch name to push a different branch, not just master. by default git push will only push your master branch.
    git push (remote name) (branch name)
    git push origin master
    git push qoob docs

    a note about security. git is the so-called: "stupid content tracker". it's primary function is to manage your code. while git has the ability to sync (both to and from) remote locations, security is not an integrated part of git. it's the burden of the server hosting the remote repo to control who has access to it. any remote repo that is "viewable" can be cloned. but unless access has been setup to accept changes it cannot be pushed to by default. i could talk about this all day, but i want to focus on using git more than setting up a server to host it. you can read more about this in the pro-git book.

    software evolves over time. and if your remote repo is in active development, there's a good chance your version will eventually fall behind. if you want to get the latest changes from a remote repo, use the pull command
    git pull
    This also works with branches as well.
    git pull (remote name) (branch name)
    git pull origin master
    git pull qoob docs

    FYI,
    once you have done this you can use the git push/pull command on its own and git will add the remote and branch name for you. but personally i like to be specific and tell git exactly what i want it to do.

    another way to get remote changes from a repo is the fetch command. fetch is a more atomic version of the pull command. fetch will both pull the new changes from the remote repo but also merge your local changes. note this only applies to your local clone, the merge that takes place after the pull will only be applied to your copy of the repo, but there's nothing stopping you from pushing it back to the server later.
    git fetch (remote name) (branch name)

    pulling from a new repositorygit log --graph
    deleing a merged branch
    git branch -d (branch name)
    deleing an unmerged branch
    git branch -D (branch name)

    merging

    the flip side of branching is merging. once you have completed your work on a branch you can merge those changes into another branch. these changes include file additions, deletions, and modifications. note that the syntax of the merge command takes the supplied branch name and merges it into your current, checked out, branch.
    git merge (branch name)
    e.g. merge the changes from a branch named topic into your master branch.
    git checkout master
    git merge topic

    for simple merges git will automatically figure out what's different between the branches and combine them (using git diff command internally). but sometimes the differences between branches are too complex or too ambiguous for git to decide on its own. in these cases git will issue a merge conflict. when a conflict occurs, git changes the code in the effected file(s) with conflict markers. these markers make it easy for you to see the differences between branches. all you need to do is delete the markers and leave the correct lines in the file. here's an example of what merge conflict markers look like:

    >>>>>>> HEAD
    This is the line in the master branch
    =======
    This is the line in another branch
    <<<<<<< branch_name
    

    once a conflict occurs, i find it simple to just grep the files in your repo looking for the conflict markers to find the files that need fixed before the merge can complete.
    git status --short | grep "^U[UAD]"
    i have this setup as an alias call git conflicts.

    once you have fixed all the merge conflicts stage the changes with git add then git commit them to the repository. i almost always mention fixing merge conflicts in the commit message after doing this.

    but sometimes after doing a merge things don't work, and you want to revert your repo back to its previous state. to undo a merge you will use the reset command with the --hard flag and set it back to its original head state
    git reset --hard ORIG_HEAD

    rebasing

    there are two main ways to integrate changes from one branch to another. the simple method previously discussed is the merge. but the alternative is called a rebase. here's the difference, a merge will perform a "three-way" merge between the two newest commits for two given branches and the most recent common ancestor of the two, creating a new commit. the rebase command takes a patch of the changes introduced in one branch and applies it to another branch. the rebase command takes the changes committed to one branch and "replays" them onto another one at a time. bebasing is used to create a cleaner git history. after doing a rebase, run git log and notice that your commit history has been altered. one of your branches will be missing and it's commits will now appear on your other branch, creating a more linear track of development. rebasing replays commits in their original order, as opposed to merging which takes the endpoints and merges them together.

    git rebase (branch name)
    to rebase the changes from a dev branch onto the master branch
    git checkout master
    git rebase dev
    it's also possible to rebase commits from multiple branches at once. just specify two branch names
    git rebase (branch name 1) (branch name 2)
    git rebase dev bugfix
    you can also specify where to apply the rebase with the --onto flag
    git rebase --onto (target branch) (branch to rebase)
    git rebase --onto master bugfix
    rebasing can get confusing, so git a an interactive rebase tool. use the -i{ating commits

    if the main point of git is tracking the state of files in your repo, what's the point if you cannot view them again later? git allows you to "travel through time" and revert your working directory to any previous state. to do this you use the checkout command.
    git checkout (reference) (filename)
    the reference can be a commit id (SHA-1 hash), branch name, tag name, or HEAD reference. optionally, you can supply a filename with your reference. if a filename is used, only that file will be reverted, otherwise the entire working directory will be changed.

    a note about HEAD references...
    at any given time a particular commit is labeled as the HEAD revision. this is the active point of development in your repo. whenever you add a new commit the HEAD will reference the newly created commit id. but if you checkout a previous commit, the HEAD will be moved to that particular commit id. when the HEAD is not pointing to the current tip of a branch this is called a detached HEAD. please note that you cannot intrinsically commit from a detached head. but it is possible to branch off from it and add commits to the new branch. moving around in history you will eventually want to put the HEAD back to bleeding edge and continue work as normal. the easiest way is to just checkout that branch again.

    but calling checkout with just HEAD makes no sense.
    git checkout HEAD
    since the HEAD is always where you currently are. instead checkout a previous HEAD.
    to checkout the previous commit before the current HEAD
    git checkout HEAD^
    or
    git checkout HEAD~1
    to check out 3 commits before the current HEAD
    git checkout HEAD^^^
    or
    get checkout HEAD~3
    notice a pattern here? there are 2 types of notations related to the HEAD reference. the up carrot (^) means one before, while the tilde (~) means the suffixing number before. as you can guess, no one wants to type 15 carrots to move back 15 commits ;D

    branching

    why? sometimes you need to experiment with your project, but don't want to mess up your current work. perhaps your working on two very similar, yet independent tracks of development. using a branch for each can help you keep your work parallel, yet separate. another reason could be working in a team environment; other people are working on the master branch while you're adding/testing new features in your own branch. later on you can merge your changes back into the main branch along with the work other people have done in the meantime. (more on merging later)

    when you create a new branch it forks off from your current commit. any new commits added will be viewed as an independent track of development. other commits can be added to the parent branch without affecting your new, or any other, branch.

    to view all the branches in your repo
    git branch

    notice the asterisk next to your current branch (default is master)? that denotes the branch you're currently working on.

    to create a new branch
    git branch (branch name)
    switch to a new branch (or commit)
    git checkout (branch name/commit id)
    create a new branch and immediately switch to it
    git checkout -b (branch name)
    git ships with a branch viewer called gitk. this application shows you a diagram of your repositories history. using the --all flag will show you all the branches in your repo, not just your current one.
    gitk --all
    you can also view your branches with the log command with the --graph flag

    view the demo source

    so that wasn't enough.
    i decide that i wanted to trace the actual papervision3D logo. and since i have already made it in a font, it wasn't hard at all. working with the optimized version of the font on my site worked fine, but since there were so few verticies, the script would draw the logo in a matter of seconds. so instead of trying to devise a method of tweening from vertice to vertice i just went into font lab and added more points! 

    (the font used in this demo is available here)

    pv3d logo font

    now, i went into 3D studio max, clicked the "splines" button, and created a new text object. i used the new PV3D.Flex.Font i just made, set the size to 100 (larger/smaller is fine) and typed in the letter "A" (the only character in the font).

    3D text object

    after that i used the rotation tools to stand the letter upright, and moved it forward some. the next step is to do a mesh select, by clicking the modifiers tab and selecting "mesh select" from the dropdown menu. then in the mesh select parameters panel select vertices. now click back into your main perspective and select all the vertices (ctrl+a).

    mesh select

    the next step is an important one ((and the one i always forget)) we need to give our 3D object a uvw mapping. still under the modifiers tab, select "UVW Mapping" from the dropdown list. and under the parameters panel make sure its mapping mode is set to "Planar". i was having all kinds of trouble exporting 3D objects that were based on points only. seraf explained to me that w/o a uvw mapping on your object the as3geomClassExporter cant map the u and v points onto the triangle mesh, which are needed for texturing purposes.

    UVW wrap

    now its time to export our 3D logo, click on the tools tab and select max script, then run the as3geomClassExporter. set your package folder and the actual class name, then select papervision3D 2.0 from the dropdown list. for this particular object i left the scale set to 1. then click export class and save it in the same folder as you set in your package. 

    export

    then its onto flex.
    i decided i wanted to use the math-based color fade from my last demo again, so i couldn't use the standard color picker. this demo uses 2 states, normal and the color picker. which is just a 2nd state with a panel object w/ blank flex buttons on them. using the flex buttons worked out well because i was able to just set the color gradient to the same colors in the fade, or just solid ones for the normal sets. i tried to make is one a simple as possible so you can understand the core concepts of what's going on more than the over-all "flashy-ness" of the thing. so enjoy!

    click here to view the demo
    and its source of course!

    G6s="center">NYC museum of modern architecture and design

    NYC museum of modern architecture and design

    NYC museum of modern architecture and design

    he last museum that we went to was the museum of natural history. which was really cool, but very busy. a lot of my photos from here didn't turn out as i hoped, so here's a few of the good ones.

    NYC museum of natural history

    NYC museum of natural history

    NYC museum of natural history

    NYC museum of natural history

    NYC museum of natural history

    and they had a REDICULOUS amount of dinosaur bones!

    NYC museum of natural history

    NYC museum of natural history

    NYC museum of natural history

    so, they don't let you inside the statue of liberty anymore. so what's the point of going to that tiny super crowed island just to try and look up lady libery's dress. so instead, john suggested we go to liberty park in new jersey to check out the statue. h the jet set. the flight was so short i barely beat metroid fusion on the plane ride there and back with 98% completion. we had a party thrown for our arrival, at my cousin ashley's house. i got to see all my relatives and meet my cousin's new baby angelina. she's a lil cutie. for the next few days we just hung out and went to beaches.

    its not a vacation unless there's a beach right?

    xero

    we spent one of the days in a town called jupiter. the beach was very nice, the sand smooth, the water warm. and my uncle knew about this cool lighthouse. there was a sweet banyan tree outside. the lighthouse was 7 stories and had a sweet spiral staircase.

    jupiter lighthouse

    jupiter lighthouse - spiral staircase

    jupiter lighthouse - hang over

    we saw some crazy stuff at the bass museum. weird stuff... after a few nights of sleeping at my cousin's house on an air mattress, we decided to spend our final night at a hotel. we stayed at a place in miami called the blue moon. it had this old 50's but still in good shape feel, but with a touch of modernism. the carpet was awesome. Good times were had by all.

    more photos

    bass museum

    cool painting

    CSI miami xero

    H( + Q) that are used in the algorithm to define the knot. in general, given P + Q mutually prime, the line wraps meridionally around the torus P times and wraps the longitudinally around it Q times. i was having some trouble grasping exactly how this was going to be achieved, until i read this article on blackpawn’s website. he really breaks down the algo to a very simplistic level...

    papervision3D PQ torus knot

    here we go again, another papervision3D demo featuring math permeated lines. this time im working with a classic piece of code known as the PQ torus. the vague idea is that you have 2 numbers (P + Q) that are used in the algorithm to define the knot. in general, given P + Q mutually prime, the line wraps meridionally around the torus P times and wraps the longitudinally around it Q times. i was having some trouble grasping exactly how this was going to be achieved, until i read this article on blackpawn’s website. he really breaks down the algo to a very simplistic level...

    calculus

    r = .5 * (2 + sin(Q * Φ))
    x = r * cos(P * Φ)
    y = r * cos(Q * Φ)
    z = r * sin(P * Φ)

    simple right? lol.
    so Φ (or phi in my code) is basically a variable that is definded by change. in this case, im simply incrementing phi + .02 every frame. this seeds the math and gives you the cool visual effect.

    anyway, after getting a handle on the math, writing the demo code was a snap. i took the existing code i wrote from the 3D object tracer and the lorenz attractor and combined them. (i also found + fixed an error for computing the line gradient color) i started out by allowing the users to only select values for PQ and that actually made sense.

     

    papervision3D PQ torus knot

    papervision3D PQ torus knot

    but after some experimentation i found that using some unorthodox values for P+Q could net some very interesting results. take a look at some of these...

    papervision3D PQ torus knot

    papervision3D PQ torus knot

    papervision3D PQ torus knot

    papervision3D PQ torus knot

    click here to check out the demo
    and click here to view the source

    Hͥ rr -15E  graffi  -15MU graffiti_patchespouch bomb patchesranger / vandal eyes

    graffiti patches when my son was born, i promised nina i'd quit doing graff in the streets. since then, i've been doing lots of blackbook and ipad art to placate my desires to write.

    since i got into metal and punk as a kid i've been collecting and wearing patches. mostly bands, but eventually morale patches. recently ranger eyes (smaller approximately 1x1 inch velcro backed pvc patches) have taken the EDC world by storm. i'd seen a few other graff style patches, and jon from inkpot artworks coined the term "vandaleyes" as a play on "vandalize" and "ranger eyes". so i decided to get involved.

    i came up with a sick "xero" bomb or throwie. and worked with dave @ on the DL brand, who suggested glow in the dark! to make them a reality.

    get em at: shop.xero.style

    when my son was born, i promised nina i'd quit doing graff in the streets. since then, i've been doing lots of blackbook and ipad art to placate my desires to write.

    since i got into metal and punk as a kid i've been collecting and wearing patches. mostly bands, but eventually morale patches. recently ranger eyes (smaller approximately 1x1 inch velcro backed pvc patches) have taken the edc world by storm. i'd seen a few other graff style patches, and jon from inkpot artworks coined the term "vandaleyes" as a play on "vandalize" and "ranger eyes". so i decided to get involved.

    i came up with a sick "xero" bomb or throwie. and worked with dave @ on the DL brand, who suggested glow in the dark! to make them a reality.

    get em at: shop.xero.style

    bR  l l} 11;SS bliss_sim_for_ipadBLiSS Sim for ipadmy first itunes release

    BLiSS Sim

    the Bioregenerative Life Support System Simulator, BLiSS Sim, is an ipad app, built with titanium studio, based on investigations conducted by NASA scientists and engineers to explore how plants can be grown to provide air, water, and food for astronauts at a lunar base.

    BLiSS uses a game format to engage youth and adults in the challenges of supporting humans in space or extreme environments on earth.

    The app is free and available for download from the iTunes Store.
    Visit the promotional website at: http://bliss-sim.cet.edu/

    BLiSS Sim

    the Bioregenerative Life Support System Simulator, BLiSS Sim, is an ipad app, built with titanium studio, based on investigations conducted by NASA scientists and engineers to explore how plants can be grown to provide air, water, and food for astronauts at a lunar base.

    BLiSS uses a game format to engage youth and adults in the challenges of supporting humans in space or extreme environments on earth.

    The app is free and available for download from the iTunes Store.
    Visit the promotional website at: http://bliss-sim.cet.edu/

    ORlound mod" src="https://blog.x-e.ro/ui/img/blog/prosound07.png" alt="wiring schema - gameboy prosound mod" width="710" height="180" />

    the wiring is pretty simple. there's 5 solder points that connect the potentiometer to the gameboys board. the top 2 we are going to ignore. they are volume into the pot. the next 2 are the left and right audio out of the pot and finally the ground.

    wiring complete - gameboy prosound mod

    when it comes to solder, less is more. this is true for both heat and actual metal. the amount of solder to use varies from gameboy unit to unit. some have a moderate amount, so you can just heat up whats already there and use your pre-tinned wires. but some have a huge blob there already. in those cases i suggest you remove the existing solder with some desoldering braid then use a tiny amount to connect your wires.

    wiring complete - gameboy prosound mod

    when doing this take your time. make sure you are connecting the correct prongs of the jack to the right pins on the board. the wiring pinout diagram should be on the packaging of the jack, and varies from model to model.

    reconnect the display cable - gameboy prosound mod

    now carefully reconnect the display cable. put your fingers under the edge on the ribbon cable and push it up into place. don't try and rock the cable back and forth to get it into place. this could rub off some of the metal on the leads. the photo is the cable fully inserted. notice how much metal is still showing.

    close the case - gameboy prosound mod

    the final step is closing the case. this can be tricky. take your time. make sure none of the prosound jack's wires are sticking out or stuck between the edges of the case when closing it. also keep the wires clear of the contrast dial. 

    the finished prosound jack - gameboy prosound mod

    now your gameboy is prosound modified! the added 1/8" jack will reduce background noise when recording and actually increase volume and give you added bass because it's a line level output. now pop in your favorite 8bit music application and make some chip tunes! 

    gameboy prosound mod

    I A~ 11;G= switching_to_linuxswitching to linuxdistrohoppers anonymous

    linux screen shot

    switching to from windows to linux is one of the best choices i have made in years. the freedom it provides is unparalleled. the fact that it's 100% free, the open nature of it's development, the community focus, and the abundance of free software was enough to convince me to give it a try.

    linux screen shot

    switching to from windows to linux is one of the best choices i have made in years. the freedom it provides is unparalleled. the fact that it's 100% free, the open nature of it's development, the community focus, and the abundance of free software was enough to convince me to give it a try.

    farewell windows

    i have been a long time windows user, it's served me well over the years. but recently i have become overwhelmingly sick of all the issues related to running it. every month (patch tuesday, inevitably followed by exploit wednesday) there's a plethora of updates, none of which ever seem to be related to security or stability. the so called windows "command line" is the saddest excuse for a terminal i have ever had the displeasure of using. and the "new" version, windows 8, has taken 10 steps back in terms of usability. the metro ui looks like AOL in the 90's, everything is hidden away from the user, it takes all your previous knowledge about your OS and tosses it in the trash.

    to be fair, i've had some linux experience before. in college we learned how to install it and connect to it via samba. i was given numerous live CDs featuring distributions like ubuntu, kororaa, and knoppix. i don't know why, but at the time i just wasn't interested in learning an entirely new OS. maybe my reluctance was based on the fact that i was still satisfied with my windows experience, maybe i was "too busy" learning new programming techniques, maybe it was fear of change. but whatever the reason, i just sort-of wrote linux off as a server OS.

    the terminal

    recently i have been using the terminal more and more. with the advent of GIT, i had started using MinGW. this added *nix like commands to windows. the more i used it the more i realized i was trying to force windows to be linux. i would research how to do something in linux then have to decide how to pull that off in windows. i learned to love the simplicity to move files with a single command versus dragging and dropping between two windows. the more i use the terminal the more i hate the mouse. have you ever tried to manually rename more than 100 files in windows? it's a painfully long process. with one command and some regex (regular expressions) you can do it in a few seconds from the twem>*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

    crontab file syntax

    the file can be separated into two parts:

    here's a cheatsheet for the interval syntax

      .---------------- Minute (0 - 59)
      |  .------------- Hour (0 - 23)
      |  |  .---------- Day of the Month (1 - 31)
      |  |  |  .------- Month (1 - 12)
      |  |  |  |  .---- Day of the Week (0 - 6) (Sunday=0 or 7)
      |  |  |  |  |
      *  *  *  *  *  example-script.sh
    

    here's an example entry:
    this job would run every half an hour on monday through friday.

    30 * * * 1-5    echo "cron job executed"
    

    valid time values

    Minute          0-59 (* every minute at the start of each minute)
    Hour            0-23 (* every hour at the start of every hour)
    Day of Month    0-31 (* every day)
    Month           1-12 (* every month, you can use month names if you prefer)
    Day of Week     0-7  (0 and 7 both mean sunday, again you can use names - see below)
    

    an alternative to the six field crontab syntax would be the two field option which consists of two fields the date / time and the actual command.

    here's a list of the most common @ options for cron:

    @reboot     -   runs when the machine is started up or if the cron daemon is restarted
    @midnight   -   runs once a day at midnight (the equivalent of 0 0 * * *)
    @daily      -   alias of @midnight
    @weekly     -   runs once a week on sunday (the equivalent of 0 0 * * 0)
    @monthly    -   runs once a month on the first day of every month at midnight (the equivalent of 0 0 1 * *)
    @annually   -   runs once a year at midnight on the first day of the first month and (the equivalent of 0 0  1 1 *)
    @yearly     -   alias of @annually
    

    email results

    on the very first line of the crontab file you can specify an email address to send the results of the job to. using the following syntax: MAILTO=cron@x-e.ro

    the raw output of your job is will be emailed to the supplied address. the results could be echo statements, html, xml, json, whatever.

    examples

    on march 12th at 7:45pm load the http://x-e.ro/cron/job page

    45 19 12 3 * curl --silent --compressed http://x-e.ro/cron/job

    chaining multiple commands is exactly like regular shell commands. link them with &&, ||, or ;

    @midnight cd /var/www/x-e.ro/ && php cron.php

    every night at midnight load the http://x-e.ro/cron/job/2 with the supplied username/password

    @daily curl -u username:password --silent --compressed http://x-e.ro/cron/job/2

    a note about passwords in cron jobs

    if your password contains a special character (it should!) that might interfere with your bash script's execution, simply escape the character with a prepending backslash. so if your password was `P4s$w0rd!` use:

    @daily curl -u xero:P4s\$w0rd\! --silent --compressed http://x-e.ro/cron/job/3

    timezone pitfalls

    an important note about cronjobs is the fact that the execution time is tied directly to the server's time. make sure the server's time is in the timezone that you expect before setting up your jobs. execute the `date` command on the server and look at the time code on the end of the results.

    Thu Apr 18 11:52:19 EDT 2013

    the EDT suffix indicates the server is running on Eastern Daylight Time so it would execute in our local east coast time taking daylight savings into account.

    Thu Apr 18 11:52:19 UTC 2013

    the UTC suffix indicates the server is running on Coordinated Universal Time so the server's time is four hours *ahead* of our local east coast time.

    SMdo   +?e] linux_cron_jobscron jobsautomating 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.

    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

    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.

    R4-DS the homebrew revolution

    the nintendo ds is an awesome portable gaming system. i have the ds lite, its thin, weights under a pound, has two super bright backlit screens, pretty sweet integrated speakers, the classic nintendo plus d-pad, four front buttons, and two shoulder buttons. the bottom screen is touch sensitive, which makes for some awesome gameplay. the touch screen is sick, but a lot of people can be put off by it. so tons of games let your switch between the touch motion and d-pad motion. another thing i love about the ds lite is it's backwards compatible with gameboy advance. the new nintendo ds-i however is NOT backwards compatible, which i think is ridiculous.

    the nintendo DS

    so the R4-DS is a revolution in homebrew/emulation/mod chip technology. the cart is what i like to call a "hack loader". basically during the normal boot sequence the data being read executes an exploit that allows the user to run any custom code they want. this affords many interesting possibilities. for instance custom operating system and interface graphics, running homebrew applications, or running roms/archival copies of games. the official site is here. but i bought mine on amazon.

    chrono trigger cart vs R4 cart - identical size

    as you can see, the r4-ds is the same size as a regular ds cartridge. the game shown is chrono trigger, which is a revamp of a classic super nintendo rpg, it's one of my favorite games of all time. but the r4 has a tiny sd-micro slot on the back. the size of the sd card supported varies depending on which model of the r4 you have. i have the r4-ds sd-hc version, which supports the maximum of 32 gigabytes. i suggest you get the sd-hc version, the R4-III only supports up to 2gb sd cards, which is a huge difference.

    R4-DS interface

    the main interface can be customized to look however you want. the developers of the r4 don’t provide you with a tool to customize it with themselves, but someone else has created a program called alice. its a freeware gui application that tells your all the necessary file sizes and resolutions for each of the images, as well as help you create layover, transparency, and rollover effects for menus.&nbsp;

    R4-DS circuit board skin by xero

    here's the circuit board theme i made for my r4-ds. download it here. the three buttons on the bottom left screen are the three main options of the r4. the first is ds emulations, this allows you to play archival copies of games. the center icon is the media player moonshell. it can play mp3s and a custom ds video codec. the final option is to boot to slot-2 (gameboy advance slot). this however will not play regular gba games (you have to remove the r4 to do that) this option is for booting legacy gba hackloaders.

    R4-DS metroid prime pinball playback

    playback of emulated games is flawless! the speed, the sounds, the graphics, everything looks exactly the same. even games with multiplayer functionality work perfectly. what's great about the r4 is yew can grab an 0-day rom of a new game and check it out. if it sux, you just delete the rom and forget about it. and if you find out it's awesome, then you can buy the game and feel assured what its gonna be all about. i think if nintendo allowed you to download demo roms directly to an sd card on the hardware to "try before you buy" people would go crazy, and the ds scene would explode.

    samus glimmer in DS reflection

    so now, you might be asking...

    so xero, what can you play on this? and where can i get it?

    public site is the devil's shadow. but if you google it, there are tons more. the other main application type is homebrew. and this is a very broad area. so, homebrew apps can be anything from data organizers, media players, emulators or homemade games. some of my favorites are:
    Lameboy - gameboy/color emulator. (LSDJ anyone?)
    jEnesisDS - sega genesis emulator)
    DS Organize - calendar, address book, todo list, graphics app, file browser, calculator, irc client, webbrowser, rss feed reader.
    MoonShell - do it all media player
    SvSIP -VoIP/SIP client
    glitchDS/cellsDS - a fun suite of graphical music composing tools
    and there are tons of other retro game consoles emulated for the DS.
    zophar's domain has a great list.

    JWD 8t =SI vr4ds_homebrew_revolutionR4-DSthe nintendo DS homebrew revolution

    R4-DS the homebrew revolution

    the nintendo ds is an awesome portable gaming system. i have the ds lite, its thin, weights under a pound, has two super bright back   ]u ??Ye wsql_select_into_statementSQL select into statementcopy 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]

    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]
    

    this is a great solution for cloning a table. it's fast and lightweight since it's all executed on the database end, not straddled between middleware.

    now here's another situation...
    let's say we have a simple web-form that is submitting 4 pieces of data: username, date, value1, and value2. this form has been collecting data for a long time, and all of a sudden you realize that somehow your save procedure has swapped the data for value1 and value2! some people might just dive into the table and start modifying rows. but i'm paranoid. i like to validate my SQL procedures before i destroy an entire table's worth of data. we can use the same clone table technique above to make a copy of the table, but we can go a step further and also swap the data in value1 and value2 in the same procedure.

    SELECT *
    INTO [new-table]
    FROM [old-table]
       
    DECLARE @temp AS decimal
    UPDATE [new-table]
    SET @temp=value1, value1=value2, value2=@temp
    

    basically we have 2 SQL statements in one here. the first will clone old-table into new-table. the second declares a temporary variable and uses the temp var to switch the data in value1 and value2 in the new-table.

    if you only need to switch values for a smaller portion of the dataset, say all rows with an id value less than a certain number, you can simply add a where clause to the end of your statement.

    SELECT *
    INTO [new-table]
    FROM [old-table]
       
    DECLARE @temp AS decimal
    UPDATE [new-table]
    SET @temp=value1, value1=value2, value2=@temp
    WHERE id < 806
    

    this will copy the entire table into the new one, but only swap the values for ids less than 806. all other values will be cloned exactly.

    J8" target="_blank">powered link cables and 4 player adapters at his shop nonelectronics.com.

    classic HP keyboard

    the first thing you need is an old keyboard. for this mod you need a mini-din, aka a ps2 (not playstation 2), keyboard. i used an old hp ibm keyboard i pulled out of a dumpster at work. step one is testing it. plug it into a computer, open a text editor, and press all the keys. try tapping them very fast and see how often they actually fire. the responsiveness of the keys in this setting will be relative to their sensitivity in LSDJ.

    pop off the keys

    step two is popping off all the keys. use a flat head screw driver and stick it in the ridge beside the key then push the screw driver up like a lever. the key should just pop right off. repeat this process for all the normal keys. when you get to the spacebar and some of the other odd shaped keys, like enter, you might find springs or metal wires pressing two points on the keyboard. try and take note of their positioning, because you will need to put them back that way.

    piles of keys

    now you should have a piles of keys and a bare keyboard. throw all the keys in a bag, so you don't lose any, and flip the keyboard over. step three is unscrewing the keyboard, prying open and removing it's plastic covering.

    unscrew the daughter board

    carefully keep taking the keyboard apart. every model is slightly different, so pay attention so you can reassemble it. eventually you will see a small silicon daughter board with the cable attached. step four is removing the daughter board. unscrew the board from the innards of the keyboard and set it somewhere safe, like in an anti-static bag.

    a keyboard in pieces

    now that you have all the plastic removed, separate all the different parts and note how they were oriented in the casing.

    clean everything out

    step five is cleaning everything up. i just used air duster and some glass cleaner on a paper towel. clean out all the little dirty recesses between and in the keys. if your keyboard is old like mine was, this step can take a while ;D

    soft circuits

    some of the soft plastic circuits can get a little dirty or folded, clean them as well and make sure they will align correctly when you put everything back. if you have never taken apart a keyboard before, it's very interesting...

    wire labeling

    now take a look at the daughter board from the keyboard. if you’re lucky, like i was, each of the wires leading to the cables from the board will be labeled. if they are not labeled, you’re going to have to cut the end of the mini-din connector off and look at what color wire attaches to which pin number.

    painting

    step six is painting they keyboard. this step is optional. i used regular spray paint on the exterior plastic casings. i painted it all one coat of green, then splattered it slightly with a darker green. for the keys i wanted to make sure they had a less tacky feel, so i painted them with paint-markers. you can get them at an art/craft store or at some office supply stores, i like the "painters" brand. i painted the piano keys white and black and the LSDj interface keys i painted green.

    prep for soldering

    step seven is prepping your tools for soldering. clean your soldering iron with some steel wool and set it to medium/low heat. you'll need flux, wire strippers, and something to wrap your wiring with. you can use heat-shrink tubing, electrical, or duct-tape. step eight is cutting the wires from both your gameboy link cable and the keyboard. then peel apart each of the wires and strip about 1/8" off each wire. use an x-acto knife to peel back the cable shielding.

    LSDj keyboard wiring diagram

    step nine is reviewing the wiring diagram. click here to download it. you will be connecting data, clock, power, and ground wires from both the keyboard and the gameboy link cable.

    LSDj wires spliced and wrapped

    step ten is soldering the wires. wrap the wires from each cable together and dip them in flux. then add a tiny dab of solder from your iron to connect them. after all your wires are attached, wrap each of them individually, then wrap the entire bundle of wires.

    gameboy keyboard cable complete

    using the keyboard
    step one is actually syncing the keyboard to LSDj. insert the link cable you hacked onto the keyboard into the gameboy and load LSDj. press SELECT+UP and go to the PROJECT screen. move the cursor down to the SYNC dialog, and press A+RIGHT until you selection is KEYBD. notice just to the right of PURGE SEQUENCER an integer prefixed by an "I" appears. if nothing is synced to LSDJ/the gameboy this will display I00. once a device is successfully synced, this will be a larger integer (e.g. I01, I02). my keyboard oddly enought syncs as I06. 

    LSDj project screen

    making some noise
    to get some sounds to play when pressing keys on the keyboard, the sequencer must already be running. (press START) the notes you play will be played back on the next step in the phrase sequencer. if you need to get faster response timings, use a faster groove for the phrase you are playing.

    LSDj phrase screen

    an important feature of LSDj, that is easily overlooked, is when the sequencer is running the notes and instruments playing for each channel are displayed on the top right of the SONG screen. this can help a lot when you’re playing around and press the octave or instrument buttons up and down a bunch of times looking for something, and you get lost in the menus. this brings me to the one negative about the LSDj keyboard interface. every once in a while the instrument your playing will jump up or down like ten positions. i think the problem is related to pressing multiple keys too rapidly. i am not the only person to report this problem. technically the gameboy's z80i sound chip is playing each channel one note at a time in such a rapid succession it "tricks" the ear into thinking it's hearing them simultaneously. that's just how gameboy music works. and i think smashing keys on the keyboard can sometimes send multiple input messages per cycle in LSDj and glitches it, but that diagnosis is purely conjecture. and that random issue happens so rarely it's not a big deal. the interface is not perfect, but it's an easy mod, hacky, fun, and adds a new twist to LSDj.

    LSDj keyboard key chart

    key mapping
    SPACE play using custom table
    F1/F2 octave down/up
    F3/F4 instrument down/up
    F5/F6 select custom table to assign to SPACE
    F8 change pulse instrument playback channels (PU1, PU2, PU1+2)
    F9-F12 toggle channel mute (switches on key press)
    CTRL + (F9-F12) tap channel mute (switches on key press and release)

    demo video

    KU4 EE(v 99C1 xlsdj_keyboard_tutorialLSDj keyboard tutorialDIY gameboy piano interface

    LSDj keyboard

    so, making music for LSDj is fun. but after a while you start to wish you could “play" the gameboy software as a musical instrument as opposed to composing music in its tracker style interface. that's where the LSDj keyboard comes in. the idea is, the keyboard sends messages though the gameboy linkport to LSDj. the commands that can be sent vary from playing/stopping notes or chains or tables, un/muting channels, in/decreasing octaves, switching instruments, navigating screens, and more. 
    here's what the LSDj wiki says about the keyboard...

    LSDj keyboard

    so, making music for LSDj is fun. but after a while you start to wish you could “play" the gameboy software as a musical instrument as opposed to composing music in its tracker style interface. that's where the LSDj keyboard comes in. the idea is, the keyboard sends messages though the gameboy linkport to LSDJ. the commands that can be sent vary from playing/stopping notes or chains or tables, un/muting channels, in/decreasing octaves, switching instruments, navigating screens, and more. 
    here's what the LSDj wiki says about the keyboard.

    things we'll need for the mod:
    mini-din / ps2 keyboard
    gameboy link cable
    soldering iron
    solder
    flux
    wire stripper
    screw drivers
    heat-shrink tubing / electrical tape
    x-acto knife

    finding the right gameboy link cable:
    there are a few different types of gameboy link cables, in the most general of senses there are "classic" gameboy cables and gameboy "advance" cables. obviously we will need a classic cable. for this mod to work we will need to power the keyboard, so you'll need a powered gameboy link cable. you can cut off the cable end from a gameboy 4-player link adapter (model# DMG-07), like i did, or you can use the correct powered cable. otherwise you will need to add a +5v external power source. nonfinite sells both 

    xero.nu metroid logo spoof ascii.
    view this post to see the full thing. it's double the size of the teaser image.

     .___.
    /  @  \
    \ @ @ /
     {'^'}
    
    
    
                                                 .                                            
                                               .*                                            
                                                                                                  
                                                                                                  
               .                                                               ,'                 
             :                                                                 .                  
                                                                                                  
                          .                                                   .___.               
                         .'            [ http://xero.nu + Metroid Style ]    /  @  \              
                            .                                                \ @ @ /              
                            .                                                 {'^'}               
                                                                  .                               
                                                     ,'                                           
                                                                                                  
             ant to get paint everywhere i taped up old newspaper on the wall and floor. find some trash and recycle it. i also suggest you wear a breathing mask and gloves. 

    stencil graffiti - ready to paint

    so here's *most* of what i did this year. im not going to post the 85 unique prints i did of each design, just the canvas's.

    clockwork orange

    stencil graffiti - clockwork orange red canvas

    stencil graffiti - clockwork orange tag style canvas

    cowboy bebop spike

    stencil graffiti - cowboy bebop spike in black

    stencil graffiti - cowboy bebop spike in blue

    diabeetus

    stencil graffiti - diabeetus print

    stencil graffiti - diabeetus random paint test

    fight club

    stencil graffiti - fight club

    stencil graffiti - 3D fight club print

    jay and silent bob

    stencil graffiti - jay and silent bob

    OL @x --=;M zstencil_graffitistencil graffitipaintings for my friends

    stencil graffiti - fight club

    this year i decided to make xmas gifts for all my friends. part of me wanted to make something special for everyone, part of me just wanted to paint. i chose stencils as the medium for a few reasons. one, i have little experience with them. most of my graffiti has been hand drawn on the fly. some people in the 'graff scene' seem to think that stencils are cheating. but i don't see it that way. it's just another method in the same medium...

    stencil graffiti - fight club

    this year i decided to make xmas gifts for all my friends. part of me wanted to make something special for everyone, part of me just wanted to paint. i chose stencils as the medium for a few reasons. one, i have little experience with them. most of my graffiti has been hand drawn on the fly. some people in the 'graff scene' seem to think that stencils are cheating. but i don't see it that way. it's just another method in the same medium.

    after preparing you artwork (i did everything in photoshop) you will need to find the correct type of cardboard. stiff enough to not warp when wet with paint, but thin enough to be easy to cut. try and avoid the cardboard with the air bubbles in them. they are the most difficult to cut, and it's almost impossible to get very high detail with them. i like using the 'gift boxes' from retail stores. for these stencils i used boxes form dick's sporting goods, because they are a perfect thickness, and they are free. find yourself a good cutting surface. a desk you don't care about, a thin piece of wood, or one of those plastic drafting wheels. buy a new xacto knife or new blades for your existing one. this is one of the most important parts.

    the sharper the knife, the sharper the image.

    tape down your design to the cardboard and start cutting. take your time. and remember to follow the one rule of stencils: do not leave islands. by that i mean none of your design elements can be floating in the middle of the image. remember your entire design is cut in negative space on the cardboard. it's a hole or a series of them. so if there needs to be some detail within ones of these holes, the detail part must be bridged to the rest of the stencil.

    stencil graffiti - clockwork orange cut

    stencil graffiti - scraps

    after your stencils are ready to go it's time to prep your painting area. i prefer to paint outside, but since it's winter i had to use the garage with the door part way open. where ever you choose to paint make sure it's well lit and well ventilated. since i didn't w e idea of double cooked tofu was born. it’s a simple recipe for anyone new to cooking tofu. this article is meant to teach you how to cook tofu, not flavor it. tofu is known for taking on the tastes of whatever it’s cooked with. after cooking the tofu in this method you can coat or sauté it in a sauce of your choice, or eat it plain. 

    things needed:
    1 block of tofu (i prefer firm or extra firm)
    steamer
    vegetable oil
    frying pan
    paper towels
    tongs (or metal slotted spoon)
    oven mitt

    pressing

    tofu comes packages in ‘water’. but it’s gross bean flavored water. the first step in preparing tofu is pressing this water out of your block of tofu. this step is necessary in *any method* of preparing tofu. and it can be easily overlooked by a first timer.

    tofu - block

    start by laying out 5 or 6 pieces of paper towel on a cutting board. position the tofu in a corner.

    tofu - wrapped

    wrap the tofu in the paper towels. try and have the thickest part of the paper towels on the bottom to collect maximum moisture.

    tofu - press

    put a stack of heavy books on top of the wrapped tofu. leave them there for 3-5 minutes. repeat this process 2 or 3 times until the paper towels are dry after pressing.

    cutting

    the method in which you cut your tofu is really up to you. but try and keep the pieces thin and a bit large. tofu shrinks when it's fried. here's my method:

    tofu - cut

    start by cutting the entire block in half.

    tofu - filet

    evenly filet each half of the block into 3 pieces, then stack them back on top of each other.

    tofu - triangles

    cut your rectangle in half short-ways. then cut and 'X' into each half.

    steaming

    this step is the real secret to double cooked tofu. we just removed the liquid from the tofu by pressing it. now we're going to add some back and cook the center of the tofu in the process. this makes for fuller, spongyer tofu.

    tofu - steamer

    place your tofu pieces in the steamer. make sure they're not touching.

    tofu - steaming

    steam your tofu using distilled water for 15-30 minutes. (i personally only cook it for 15)

    tofu - steamed

    when the timer is up, open the lid and let your tofu cool for a few minutes.

    frying

    now we're going to add a crispy exterior to our already steamed tofu. this will also alter the flavor of the tofu slightly depending on the type of oil you choose (e.g. vegetable, peanut, or olive oil, etc).

    tofu - utensils

    get a plate and cover it with 2 or 3 sheets of paper towel. this will be using the remove the oil from the tofu during the drying process.

    tofu - oil

    get a non-stick frying pan and fill it with vegetable oil (i enjoy the smart balance brand) deep enough to submerge the tofu in. set the heat to medium/medium-low. add 1/3 of your tofu pieces to the oil using tongs or a metal (frying safe) slotted spoon.

    tofu - frying

    the actual frying can be quite violent because of the water we introduced into the center of the tofu. if the bubbling is too fierce, turn down the heat.

    tofu - stuck

    tofu is notorious for getting suck back together when cooking. make sure your moving the pieces around while frying. they will naturally be attracted to one and other. this process with also inadvertently flip and rotate the tofu under the oil, cooking it more thoroughly.

    tofu - half-done

    this piece of tofu is about half done. notice the white marks.

    tofu - finished

    this piece of tofu is almost finished. notice the even golden color. but you can leave this in for another minute or two for increased crispness.

    tofu - double-cooked

    as you take the tofu out of the oil place them on the paper towels. after a minute or so flip them to remove the oil from the opposite side.

    you're done!

    that's it! now you can add this tofu to stir-fry, a noodle bowl, a salad, or anything else you desire. enjoy!

    N1  yz 55K)O |git_with_the_programgit with the programsource 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.


    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.

    why use git?

    speed and performance.
    git is very fast. nearly all operations are preformed locally, giving it a huge speed advantage over other centralized systems which constantly have to communicate with an external server. git handles large repositories very well with is simple, yet very effective, design. and it's programmed in C, which reduces the run-time overhead of other higher level programming languages.

    complete history.
    every git repository, whether created locally or cloned from a remote location, contains its entire history. once you have a copy of the repository you can move forward and backward in time from the bleeding edge to the initial commit. if you make a few mistakes, introduce some new bug, or just want to reset to a previous state, your just on xy 11AI! {double_cooked_tofudouble cooked tofusteamed and fried goodness

    tofu - double-cooked

    one day i walked into an unfamiliar chinese restaurant and ordered szechuan tofu. the nice lady behind the counter asked me if i wanted it steamed, fried... or both. at that moment my mind was blown. and the idea of double cooked tofu was born. it’s a simple recipe for anyone new to cooking tofu. this article is meant to teach you how to cook tofu, not flavor it. tofu is known for taking on the tastes of whatever it’s cooked with. after cooking the tofu in this method you can coat or sauté it in a sauce of your choice, or eat it plain.

    one day i walked into an unfamiliar chinese restaurant and ordered szechuan tofu. the nice lady behind the counter asked me if i wanted it steamed, fried… or both. at that moment my mind was blown. and th e command away.

    git is distributed.
    managing your project with git can be either completely offline or a combination of on and offline. git can do almost everything offline: adding, committing, branching, merging, etc. many SCMs think this is a bad thing, but i couldn't disagree more. you can use git with a centralized server or not. it has all the powers of subversion and more.

    cheap branching.
    with git, it takes less than a second to create a branch. everything happens in your local repository so there's no need to connect to a central server. you can create a branch to test a new feature, try new techniques, etc, without affecting your "master" branch. you can switch between branches on the fly and watch the contents of your working directory change immediately after executing the command. and, if you want, you can branch out from another branch, or merge it back into another branch.

    git is clean.
    there is only one .git folder for your entire project. other source code management systems, like subversion, create SCM folders in every directory. with git you can easily remove or rename directories in your repository without the worry of messing up things up. and if you want to remove SCM from your project is it's a snap with git, just delete the single .git directory and you're done.

    data assurance.
    the data model that git employs ensures the cryptographic integrity of every bit of/in your project. every object in your repository is checksummed via SHA-1 hash. this hash both identifies objects and is used to check them in and out of the repository. it's impossible to retrieve something from a git repository other than exactly what you put in. it's also impossible to change anything in the repository (filenames, content, timestamps, commit messages, or any other tracked data) without changing all the hash ids of everything after it. a real world example of this is when the linux kernel site was hacked.

    nomenclature

    the git community uses many terms and abbreviations, let's start by demystifying some of them

    SCM = source code manager/management
    an application used to manage your code. some examples would be:

    • git
    • subversion (svn)
    • mercurial
    • bitkeeper
    • cvs

    each of these work differently. they have similar goals, managing your code, but do it in very different ways. wikipedia has a good article on comparing and contrasting them. this article will (obviously) be focused on git, but i will mention SVN from time to time.

    metadata
    where all the git magic occurs. these are the "behind the scenes" files that git creates and uses, these files all live in the .git directory.

    commit
    a commit is a full snapshot of your repository at a given time. git identifies commits by a 40 character SHA-1 hash. but 99% of the time people use the "human hash" version, which is just the first 7 characters of the hash identifier (git will complain if a shortened id is ambiguous and give you suggestions). if you're worried about hash collisions in git, read linus' retort from the mailing list.

    repo = repository
    a git repo is a repository of code that's being managed by git.

    working directory
    the area where your checked out files reside. files in the working directory are ready to be viewed, modified, or added or removed from the index.

    index
    the staging area where files are added/removed prior to committing them to the repository. this index is also sometimes referred to  as the staging area or the directory cache.

    tracking
    we like to say that git tracks your changes. any file you choose to add to your repository index is tracked by git. it will notice any change, no matter how subtle.

    HEAD
    a pointer referring to the most recent commit on the current branch. when you checkout a previous commit your HEAD will move to whatever point you have checked out.

    branch
    the given context of your repository. git enables you to have multiple branches that have their own commits. a branch can be based upon other commits or work autonomously from others. (e.g. the master being the stable code branch, while the others are for new features, bug fixes, etc. or a repo with three branches -bin: compiled application, -src: source code, -docs: documentation.)

    stash
    a special list of commits used to hold temporary changes, like an internal git clipboard.

    config
    this is git configuration data that's specific to a repo. this information is found under .git/config, in plain text. it holds information about remote repos, the correlation between local and remote branches, and more. there is also a global git config which hold default configurations for all repos. the global config lives in your home directory in a file named .gitconfig

    hooks
    these are special event-based scripts to enforce policy. hooks are local only files that also live in the .git directory. they are user specific and are not cloned/pushed/pulled from remote repos.

    data structures

    in general, git only has two data structures: the mutable index that caches information about the working directory and the next revision to be committed; and an immutable, append only object database. the index is used as a correlation between the object db and the working tree.

    there are four types of objects in the database:

    • blob: the raw content of a file. No filename, timestamp, or other metadata.
    • tree: a list of filenames, complete with metadata , and a symbolic link to the blob or other tree that it's describing.
    • commit: this object links tree objects together into a history. it contains the name of the root level tree, timestamp, user supplied commit message, and the names of zero or more parent commits.
    • tag: this is a simple user defined reference to another object (usually a commit id) that can hold more metadata about an object. frequently these are used as the equivalent of bookmarks for release versions (e.g. v1, v1.5, v2, etc)... but since they are user defined use them as you like :D

    the object database is located under .git/objects/
    each object is identified by a SHA-1 hash of its contents. for optimal speed and indexing, the object is lives in a directory that's named with the first two characters of the hash, then the object file itself is named with the remaining 38 characters of the hash. this creates a fixed 256-way partitioning of all objects. this even distribution will optimize file systems which have restrictions on the total number of files per directory. with each revision of a file, its contents change. thus git recognizes the file as a new hash, and stores it as a new blob. and in the opposite situation, files that do not change or just change name or location will not be rewritten to git's object database. examining the trees in each commit object will reveal this correlation. when the contents of a file is saved to a blob, it is done using zlib compression. note, you can create packs of objects to save disk space which alternatively uses the delta compression method. this is usually only necessary in huge repositories with large commit histories.

    download & install

    git is available in two flavors: CLI (command line interface) and GUI (graphical user interface) for the big three operating systems: windows, linux and mac. the source code is also available.

    personally i use, and suggest first learning, the command line version. this article will focus on git from that perspective. if you first understand the commands, using a GUI will make a lot more sense.

    additional front-end tweaks

    **this section is completely optional, and has no effect on using git.**

    i primarily use windows (i dabble in linux), and have a few more notes about git for windows. windows doesn't have a native "terminal", only a lame "command prompt". so git is shipped/powered by a terminal emulator called minGW. this application by itself is amazing. it adds many linux bash commands (and shell scripts!) to windows that you can use with or without git (e.g. grep and ssh). but alas, the minGW terminal window is pretty lack-luster. that's why i use a terminal front-end called console2. console2 adds lots of great features, some functional others aesthetic. it supports multiple terminals, i personally use the windows command prompt, git/minGW, and shortcuts to the python interpreter and mysql console. it features tabs for multiple open terminals, copy/paste functionality, customizable hotkeys, resizable windows, transparency, background images, personalized colors, and more.

    after installing console2 you need to set it up. run the application and right click anywhere on the screen and select: edit >> settings. then choose "tabs" from the accordion menu on the left. the default tab for the windows command prompt should already exist, notice the "shell" value is set to cmd.exe create a new tab and name it git bash (or whatever). set the shell value to your install location of git with the \bin\sh.exe application suffexed with --login - i
    mine looks like this:
    C:\Program Files (x86)\Git\bin\sh.exe --login -i

    you might also want to make this your default tab for console2. while you're here, check out the other options like the cursor style and color, window title and icon. also, go under the "behavior" options and enable copy/paste (you'll thank me later). you can paste by pressing the insert key or right clicking the window and selecting: edit >> paste. to copy text from the terminal hold the SHIFT key and highlight your text with the mouse (yeah i know, it sux using the mouse as opposed to the keyboard arrow keys, but it's better than nothing).

    custom welcome screen.
    it's possible to setup git to run a number of tasks when it first loads via a shell script. tn your user's home directory (windows: C:\users\your_user_name\   linux: ~/) there's a hidden file called .bashrc (if it's not there just create it. enter: touch .bashrc in the terminal). you can do two things in this file, create aliases and set default files to run on startup. the last line on my .bashrc is ~/ascii.sh — this a script that displays some ascii art i made. since it's listed (on its own line) in the file, it will be called after application startup. the contents of that file are as follows:

    #!/bin/sh
    clear
    echo -e "                             "
    echo -e "  \e[00;32m      xxx         "
    echo -e "  \e[00;32m      xxx        \e[01;33m welcome to GIT"
    echo -e "  \e[00;32m xxxxxxxxxxxxx   \e[01;33m the information manager from hell"
    echo -e "  \e[00;32m xxxxxxxxxxxxx    "
    echo -e "  \e[00;32m      xxx         "
    echo -e "  \e[00;32m      xxx         "
    echo -e "  \e[00;32m                 \e[01;37m " $(git --version)
    echo -e "  \e[00;31m xxxxxxxxxxxxx   \e[01;37m powered by console 2.00.148"
    echo -e "  \e[00;31m xxxxxxxxxxxxx    "
    echo -e "                             "
    echo -e "  \e[01;30m   xx   xxxxxx    "
    echo -e "  \e[01;30m  xx    xx xx    \e[01;37m run \e[00;32m'git help git'"
    echo -e "  \e[01;30m xx     xx  xx   \e[01;37m to display the help index."
    echo -e "  \e[01;30m xx         xx    "
    echo -e "  \e[01;30m  xx       xx    \e[01;37m run \e[00;32m'git help '"
    echo -e "  \e[01;30m   xxxxxxxxx     \e[01;37m to display help for specific commands."
    echo -e "  \e[01;30m     xxxxx        "
    echo -e "\e[00m                       "
    

    if you save that file as ascii.sh in your home directory, add it to the .bashrc, and restart console2... BOOM! some awesome looking ascii art appears every time git runs :D
    ok, enough of that, let's take about git.

    configuration

    you should start by globally telling git who you are. your name and email are used in all commit messages. the global values will be used by default for all your git repositories.

    git config --global user.name "xero harrison"
    git config --global user.email "x@xero.nu"

    this information is saved in the .gitconfig file in your home directory
    (windows: C:/user/your_username/   linux: ~/)
    to view this information use:

    git config user.name
    git config user.email

    if for some reason you'd like to override your default config settings in a specific repo issue the commands:

    git config user.name "xero harrison"
    git config user.email "x@xero.nu"

    notice we dropped the --global flag, this tells git to apply these only to the repo we're working in.

    terminal navigation

    it's easy to reenter previous commands.
    you can scroll through your terminal history by pressing up and down.

    most commands can be auto-completed by pressing the tab key, even branch and tag names.
    gi <tab> chec <tab> ma <tab>
    will autocomplete to:
    git checkout master

    creating aliases will speed up your workflow by making you type less. you can manually add them to the .gitconfig file but there's a simple command to create them automatically. if you want to add a global alias to call the git checkout command simply as git co enter:
    git config --global alias.co=checkout
    if you wanted to add an alias for just the current repo drop the --global flag.

    a good, all be it very dangerous, alias git undo will remove any changes in the current branch. since these changes have not yet been committed to SCM this action is irrevocable.
    git config alias.undo=reset --hard

    one of my favorite aliases is a custom version of git log. it adds cool ascii art branch graphs, and IMHO just the right amount of commit info is git graph:
    git config alias.graph=log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%x20(%ce)%n%x20%s%n"

    this brings me to paging. when your repo has a long enough history, like 6 or more commits, not all of that data can be displayed on the screen at once, so the terminal will page it. for those of you unfamiliar with the linux terminal, paging describes when only one page of data is displayed at a time. this feature is a holdover from the days before you could just scroll backwards, but it makes viewing a large amount of data more pleasant. when information in the terminal is being paged the command prompt at the bottom of the screen will be replaced by a colon and the blinking cursor. if you want to move up or down a single line press the up or down keys. to move down an entire page at one press the space bar or to move up or down a page press the page up or page down keys. when you reach the end of your paged data the colon at the bottom of the screen will be replaced with the word END in an inverted color pallet. to quit paging, at any time, just press the Q key.

    terminal primer

    first off, every command in both git and the terminal have help documentation built in. for general terminal commands, call the command with the --help flag to view the man pages for the command
    cd --help
    ls --help
    grep --help

    git has its own command called help, that you pass the command you want to know more about to it
    git help branch
    git help commit
    git help stash

    working with the file system.
    you change directories with the cd command:
    move to a subfolder
    cd (name)
    move up a directory
    cd ..
    move up a directory and into a subfolder called docs
    cd ../docs
    change to your home directory
    cd ~/

    You can view files in your current directory with ls command:
    ls

    create a directory
    mkdir (name)

    delete a file or directory
    rm (name)

    delete a directory and all its files and sub directories
    rm -rf (name)

    rename/move a file
    mv (old) (new)
    mv README.txt README.md
    mv dev/file.txt release/file.txt

    basic concepts

    tracking
    unlike other SCMs, git tracks the states of files, not necessarily the files themselves.

    if you want to see a list of the git commands just open the terminal and enter
    git

    this will display a list of the so-called "porcelain" commands. these are the high level commands that you will normally use. but if you want to see the full list of "plumbing" commands that the higher level commands and git itself uses internally enter
    git help --all

    if you want to see the current version of git that your using enter
    git --version

    starting out
    to initialize a git repo in your current directory
    git init
    git will display a message that the repo was initialized successfully, similar to:
    Initialized empty Git repository in c:/repos/test/.git/

    you will also notice that the directory name in the terminal will now say (master) after it. this tells you the current branch you're working on with git (master is the default).

    when git creates a new repository it's empty by default. to manage a file's content you'll have to explicitly add it to the repo to be tracked.

    ignoring files
    create a file called .gitignore in the root of your project (actually you can put this file anywhere, or put multiple ones in multiple directories). then list all the files or expressions for files git should ignore. e.g.
    *.log
    /db/schema.sql
    #this is a comment
    thumbs.db
    but just creating the .gitignore isn't enough... you'll need to add it the repository for git to track.

    adding and staging files to be tracked by git
    once you have created or edited a file in your repo, stage it
    git add (filename)
    once the file is staged, git is ready to add it to the next commit.
    you can add files individually by using git add with a filename
    git add index.php
    or multiple files
    git add index.php login.php /somedir/somefile.php
    or you can add all the files in the current directory by using
    git add .
    (fyi: the argument . [period or dot] in linux parlance, is shorthand for the current directory)

    moving, renaming, and deleting tracked files
    once you have added a file to git you can move or rename it the same way as you do in the terminal, just prefix the command with git
    git mv (old file) (new file)
    similarly, you remove files in the same manner
    git rm (filename)
    moving and renaming files this way will keep your git workflow simple. in the end, calling git mv is the same as if you'd delete the file with git from a location then add it back in a new location. since the content of the file has not changed, only its location, the file will still have the same SHA-1 hash and a new blob object will not be added to the database. only a new tree and new commit will be created.

    viewing the current status of your working directory
    to see what's ready to be added or removed in your next commit
    git status

    or use the --short or -s flag to view the shortened output
    git status -s
    git status --short

    calling status will show you a list of the files to be added, modified, or deleted from the repo in the next commit. this gives you a general overview of the differences between your index and HEAD commit as well as untracked files in your working directory. but you can dig deeper than that...

    to view the exact changes made to a particular file you can diff it
    git diff (filename)

    the diff output will show you all the changes made to the file on a line by line basis. additions are marked by a plus and deletions are marked by a minus (optionally they are colored in green or red, respectively, if you have colored output enabled).

    if that's too much data for you to digest you can use the --stat flag to show only the number of insertions and deletions in the file.

    git diff (filename) --stat

    you can also diff branches
    git diff (branch name) (other branch)

    saving a moment in time
    once you have made some modifications, and added all the files you want to track, you're ready to commit it to the repo and save a snapshot of that moment.
    git commit

    the commit command has a few arguments that you might want to use.
    git commit -m 'your commit message'
    use the -m flag to append a message to your commit inline, otherwise git will open your text editor for you to enter a message in.
    git commit -a
    using the -a flag will automatically add all the files already staged that have been modified since the last commit. that means any files you've already added, not new ones.
    or you can combine those two into one!
    git commit -am 'a commit message goes here!'

    viewing the state of files in your index and working directory
    to view files that have been added to the index and working tree use ls-files.
    git ls-files
    to show detailed information about staged files
    git ls-files --stage
    to show other untracked files in the working directory
    git ls-files --other
    to view ignored files
    git ls-files --ignored

    viewing history
    git has a tool to help visualize the commit history of your repo called git log. the log aggregates the data from your commits including: the manifest of files, commit message, committer name and email, date and time, and the parent commit(s). the log command has a variety of options so you can configure it however you like. or use it in different ways for different scenarios.

    running git log with no options will give you a chronological list of commits from newest to oldest.
    git log
    for a more compact view add the --oneline flag
    git log --oneline
    but so far these are linear views of history. if you're interested in seeing branches use the --graph flag. this will add cool ascii art branch diagrams to the log results.
    git log --graph

    you could also combine the --graph and --oneline flags for a more compact graph
    git log --oneline --graph
    another command I find useful coupled with --graph is --color. this will colorize the output of the log command. in my opinion, this makes viewing the branch topology much easier.
    git log --color
    another interesting command is --reverse, this will display git's history in reverse order
    git log --reverse
    so far we've been looking at the logs of our entire repo. but if you want to view the history of a single branch just append the branch name to the command. these results will show you all commits that are "reachable" from that branch. this will include parent commits from the branch you diverged from.
    git log (branch name)
    it's also possible to have git log show you commits that are present in one branch, but not in another. this is achieved by using two branch names with the second being prefixed with an up carrot (^)
    git log (branch name) ^(branch name)
    e.g. show a log of the commits in the topic branch that are not in the master branch:
    git log topic ^master
    log will also allow you to limit your results. the simplest method is to use the -n flag, where n is the number of commits you want to show.
    show the previous commit
    git log -1
    show the previous 5 commits
    git log -5
    you can also specify a range of commit in since..until format (this is called symmetric difference)
    git log (commit id 1)..(commit id 2)
    e.g.
    git log dd342da..f9c0201
    notice in your results commit dd342da63c is not displayed. git log's formatting will always give you everything beyond your first supplied revision. the command above is the same as calling:
    git log ^dd342da f9c0201
    your basically saying: show a log of commits that are reachable from f9c020193e excluding those reachable from dd342da63c.
    you can also customize the output formatting if the log results by using the --pretty flag.
    pretty-print has a few "simple" options: oneline, short, medium (default), full, fuller, email, and raw.
    but you can define your own custom style with format. format has *A LOT* of options.
    i have overviewed them in this gist on github.
    personally, this is the pretty-print that i prefer:
    pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%x20(%ce)%n%x20%s%n"
    but how you prefer your output is complete up to you. now that you have your "perfect" log created, i suggest making it an alias. then displaying your log, formatted the way you like it, is just one command.

    log as lots more options, take a look at the git help (git help log) for a complete list.

    navigating commits
    if the main point of git is tracking the state of files in your repo, what's the point if you cannot view them again later? git allows you to "travel through time" and revert your working directory to any previous state. to do this you use the checkout command.
    git checkout (reference) (filename)
    the reference can be a commit id (SHA-1 hash), branch name, tag name, or HEAD reference. optionally, you can supply a filename with your reference. if a filename is used, only that file will be reverted, otherwise the entire working directory will be changed.

    a note about HEAD references...
    at any given time a particular commit is labeled as the HEAD revision. this is the active point of development in your repo. whenever you add a new commit the HEAD will reference the newly created commit id. but if you checkout a previous commit, the HEAD will be moved to that particular commit id. when the HEAD is not pointing to the current tip of a branch this is called a detached HEAD. please note that you cannot intrinsically commit from a detached head. but it is possible to branch off from it and add commits to the new branch. moving around in history you will eventually want to put the HEAD back to bleeding edge and continue work as normal. the easiest way is to just checkout that branch again.

    but calling checkout with just HEAD makes no sense.
    git checkout HEAD
    since the HEAD is always where you currently are. instead checkout a previous HEAD.
    to checkout the previous commit before the current HEAD
    git checkout HEAD^
    or
    git checkout HEAD~1
    to check out 3 commits before the current HEAD
    git checkout HEAD^^^
    or
    get checkout HEAD~3
    notice a pattern here? there are 2 types of notations related to the HEAD reference. the up carrot (^) means one before, while the tilde (~) means the suffixing number before. as you can guess, no one wants to type 15 carrots to move back 15 commits ;D

    branching

    why? sometimes you need to experiment with your project, but don't want to mess up your current work. perhaps your working on two very similar, yet independent tracks of development. using a branch for each can help you keep your work parallel, yet separate. another reason could be working in a team environment; other people are working on the master branch while you're adding/testing new features in your own branch. later on you can merge your changes back into the main branch along with the work other people have done in the meantime. (more on merging later)

    when you create a new branch it forks off from your current commit. any new commits added will be viewed as an independent track of development. other commits can be added to the parent branch without affecting your new, or any other, branch.

    to view all the branches in your repo
    git branch

    notice the asterisk next to your current branch (default is master)? that denotes the branch you're currently working on.

    to create a new branch
    git branch (branch name)
    switch to a new branch (or commit)
    git checkout (branch name/commit id)
    create a new branch and immediately switch to it
    git checkout -b (branch name)
    git ships with a branch viewer called gitk. this application shows you a diagram of your repositories history. using the --all flag will show you all the branches in your repo, not just your current one.
    gitk --all
    you can also view your branches with the log command with the --graph flag
    git log --graph
    deleing a merged branch
    git branch -d (branch name)
    deleing an unmerged branch
    git branch -D (branch name)

    merging

    the flip side of branching is merging. once you have completed your work on a branch you can merge those changes into another branch. these changes include file additions, deletions, and modifications. note that the syntax of the merge command takes the supplied branch name and merges it into your current, checked out, branch.
    git merge (branch name)
    e.g. merge the changes from a branch named topic into your master branch.
    git checkout master
    git merge topic

    for simple merges git will automatically figure out what's different between the branches and combine them (using git diff command internally). but sometimes the differences between branches are too complex or too ambiguous for git to decide on its own. in these cases git will issue a merge conflict. when a conflict occurs, git changes the code in the effected file(s) with conflict markers. these markers make it easy for you to see the differences between branches. all you need to do is delete the markers and leave the correct lines in the file. here's an example of what merge conflict markers look like:

    >>>>>>> HEAD
    This is the line in the master branch
    =======
    This is the line in another branch
    <<<<<<< branch_name
    

    once a conflict occurs, i find it simple to just grep the files in your repo looking for the conflict markers to find the files that need fixed before the merge can complete.
    git status --short | grep "^U[UAD]"
    i have this setup as an alias call git conflicts.

    once you have fixed all the merge conflicts stage the changes with git add then git commit them to the repository. i almost always mention fixing merge conflicts in the commit message after doing this.

    but sometimes after doing a merge things don't work, and you want to revert your repo back to its previous state. to undo a merge you will use the reset command with the --hard flag and set it back to its original head state
    git reset --hard ORIG_HEAD

    rebasing

    there are two main ways to integrate changes from one branch to another. the simple method previously discussed is the merge. but the alternative is called a rebase. here's the difference, a merge will perform a "three-way" merge between the two newest commits for two given branches and the most recent common ancestor of the two, creating a new commit. the rebase command takes a patch of the changes introduced in one branch and applies it to another branch. the rebase command takes the changes committed to one branch and "replays" them onto another one at a time. bebasing is used to create a cleaner git history. after doing a rebase, run git log and notice that your commit history has been altered. one of your branches will be missing and it's commits will now appear on your other branch, creating a more linear track of development. rebasing replays commits in their original order, as opposed to merging which takes the endpoints and merges them together.

    git rebase (branch name)
    to rebase the changes from a dev branch onto the master branch
    git checkout master
    git rebase dev
    it's also possible to rebase commits from multiple branches at once. just specify two branch names
    git rebase (branch name 1) (branch name 2)
    git rebase dev bugfix
    you can also specify where to apply the rebase with the --onto flag
    git rebase --onto (target branch) (branch to rebase)
    git rebase --onto master bugfix
    rebasing can get confusing, so git a an interactive rebase tool. use the -i flag to use interactive mode
    git rebase -i dev

    rebasing changes history!
    when rebasing you abandon existing commits and create new ones. although the new commits a very similar they are still viewed differently by git. so, a rule of thumb in the git community is to never rebase commits that you have already pushed to a public repo. the other people working on the project will be very annoyed, when pushing any changes they might have introduced to the branch you rebased will now be unavailable, they will have to rebase their repositories to match then apply their own changes.

    stashing

    git stash will save your uncommitted changes and remove them from the repo. this works almost like a clipboard. if you're working on something and a huge problem pops up. you can stash you changes, fix the crucal bug, commit your fix, then unstash and get back to what you were working on.
    git stash "message"
    git stash apply (stash id)
    cleaning up the stash (removes everything)
    git stash clear

    remote repositories

    so far all of the commands i've talked about are available offline. but let's talk about working with git over the internet. git can work over a few protocols: HTTP, HTTPS, and SSH.

    cloning
    to copying a git repository from an external site use clone
    git clone (repo url)
    git clone http://git.xero.nu:open_qoob

    by default the name of the server you have cloned from is called origin.
    if you use the branch command again with the -a flag (all) you can see remote branches as well
    git branch -a

    so if you make some changes to your local clone of the repo, you can send it back to the server with the push command. you can optionally use a branch name to push a different branch, not just master. by default git push will only push your master branch.
    git push (remote name) (branch name)
    git push origin master
    git push qoob docs

    a note about security. git is the so-called: "stupid content tracker". it's primary function is to manage your code. while git has the ability to sync (both to and from) remote locations, security is not an integrated part of git. it's the burden of the server hosting the remote repo to control who has access to it. any remote repo that is "viewable" can be cloned. but unless access has been setup to accept changes it cannot be pushed to by default. i could talk about this all day, but i want to focus on using git more than setting up a server to host it. you can read more about this in the pro-git book.

    software evolves over time. and if your remote repo is in active development, there's a good chance your version will eventually fall behind. if you want to get the latest changes from a remote repo, use the pull command
    git pull
    This also works with branches as well.
    git pull (remote name) (branch name)
    git pull origin master
    git pull qoob docs

    FYI,
    once you have done this you can use the git push/pull command on its own and git will add the remote and branch name for you. but personally i like to be specific and tell git exactly what i want it to do.

    another way to get remote changes from a repo is the fetch command. fetch is a more atomic version of the pull command. fetch will both pull the new changes from the remote repo but also merge your local changes. note this only applies to your local clone, the merge that takes place after the pull will only be applied to your copy of the repo, but there's nothing stopping you from pushing it back to the server later.
    git fetch (remote name) (branch name)

    pulling from a new repository
    just because you cloned from one repo doesn't mean you're tied to only one. you can add as many remotes as you want so you can pull/push from any/all of them.
    git remote show
    will list all the remotes for your working repository.
    use the -v (verbose) flag for additional information
    git remote -v show

    adding a new remote
    git remote add (name) (url)
    to view info about a remote
    git remote show (name)

    a note about subversion

    lots of people love svn and refuse to stop using it. most versions of git come packaged with the git-svn command (if it's not you can download it separately with the same package manager you used to get git. make sure you also have all the required curl bindings.) this will allow you to use git on a subversion repo. and the best part is, the svn users have no idea you're doing it! the git-svn command will convert all your git commands to svn commands when working with the remote repository. for all your local work, use git as normal. let them live in there "little subversion world", and you can live in the future with us using git ;D

    when cloning an svn repository use clone
    git-svn clone (url)
    then use git as normal, add commit, branch, etc. then when you're done, use the dcommit command. this will take all your git commits and package them as svn commits.
    git-svn dcommit
    if you want to pull from the svn repo use the rebase command
    git-svn rebase
    this will take all the changes from the remote svn and apply them one at a time into your local git-svn repo. by using the rebase command this will create a cleaner git history in your repo and allow for a simpler svn syncing.

    public git hosting

    there are many free/pay sites online to host git repos. most of the free plans focus on open-source projects, and thus are public. if you want a private repo you're more than likely going to have to pay.
    here's a list of some of the most popular git hosting sites:

    sources (giving credit where credit is due)

    everything in this post i learned from using git and reading about it. the following resources are both my citations for this article and a great wealth of knowledge for learning more about git (this article only scratches the surface).

    P~  k k{ 11;SS }bliss_sim_for_ipadBLiSS Sim for ipadmy first itunes release

    BLiSS Sim

    the Bioregenerative Life Support System Simulator, BLiSS Sim, is an ipad app, built with titanium studio, based on investigations conducted by NASA scientists and engineers to explore how plants can be grown to provide air, water, and food for astronauts at a lunar base.

    BLiSS uses a game format to engage youth and adults in the challenges of supporting humans in space or extreme environments on earth.

    The app is free and available for download from the iTunes Store.
    Visit the promotional website at: http://bliss-sim.cet.edu/

    BLiSS Sim

    the Bioregenerative Life Support System Simulator, BLiSS Sim, is an ipad app, built with titanium studio, based on investigations conducted by NASA scientists and engineers to explore how plants can be grown to provide air, water, and food for astronauts at a lunar base.

    BLiSS uses a game format to engage youth and adults in the challenges of supporting humans in space or extreme environments on earth.

    The app is free and available for download from the iTunes Store.
    Visit the promotional website at: http://bliss-sim.cet.edu/

    ORlrminal.

    sound advice

    one evening i had a lengthy conversion with my friend matt burdine, a long time linux user. he convinced me that there was nothing to loose and give it a try. if i dual booted, i could have the best of both worlds, and he was right.

    my first step what to decide which distro to choose. in my research, i discovered there were a few main "flavors" of linux and a many distributions based on them. each having their own goals and opinions on how an OS should operate. i decided on debian, one of the main players, with a modern/active development community, lots of FLOSS/FOSS software packages, and many distros to choose from. this lead me to distrowatch, a great site that gives you all kinds of information about the most popular linux distros. based on many reviews i selected linux mint with the cinnamon desktop. at the time, a new version had just been released. mint was a real eye opener. i realized how much of a fully fledged operating system linux was. after a month or so, i was rarely booting into my windows partition anymore. mint helped me learn, from a very high level, how linux worked. and to be honest, it was extremely similar to windows in many respects. which was one of my biggest issues with mint. i was switching to linux to leave the windows world, not to just find a free clone of it.

    distrohoppers anonymous

    this lead me to the heaven/hell that is distrohopping, switching between various linux distributions like an addiction. this practice has it's pros an cons. test driving multiple systems gives you a great overview of the terrain. quickly helping you to decide which you like, and which you don't. setting up a separate home partition, allows you to use your personal files on any of the distros you install. but this rapidly consumes all the space on your hard drive(s) by having to install (some of) the same software on each. for the next few months i had a new version on linux on my testing partitions ever week. i experimented with a number of ubuntu variants like kubuntu, xubuntu, lubuntu, etc. i used centos, elementary, puppy, fedora (redhat), netrunner, manjaro, backtrack (kali), and finally crunchbang.

    *note*
    there are two notable distros missing from the aforementioned list. ubuntu proper and archlinux. when first learning about linux i was obviously, digitally, acquainted with richard stallman, the founder of the free software foundation and GNU. i read an article he wrote about ubuntu's problems being backed by a corporation, and basically install spyware on everyone's machines. it made a lot of sense. and i figured if they were putting stuff like that into the source, what else is in there/will they add? it dissuaded me from using it. arch linux, on the other hand, is a DIY linux distro targeting proficient *nix users, offering tons of great software, build scripts, user repos, etc, but little in the way of help or support. archers are expected to maintain their own systems, work through and solve their own problems when issues occur. at this point in time, i do not feel that i am ready for that. but hopefully some day :D

    crunchbang

    crunchbang

    i had seen the write up about #! (pronounced crunch bang) on distrowatch when waldorf was first released, and was immediately intrigued. it's based on debian stable, which i still feel is one of the strongest linux flavors, and featured the lightweight openbox window manager. after installing i was taken back by how minimal it's GUI was. no desktop environment, just a WM (window manager) and a rock-solid toolkit. many of the components of #! are from the XFCE project, which i was familiar with from some other distros i tired. after a few days i realized how unnecessary a DE (desktop environment) was for my purposes. my goal was to live in the command line, and i was doing just that. but when the moment arises that you need a file manager, thunar is there to help you out. thunar is a beautiful, bare minimum, file manager. you can visually explore the file system, move files around, have it suggest which applications you should use to open files with, etc. some other notable applications that come with #! are nm-applet, a network manager which makes connecting to wired/wifi/vpn networks a breeze. gparted, a GUI disk partitioning tool, and a/xrandr a dead simple screen resolution configuration tool.

    but one of #!'s strongest points are the forums. it's a great community of friendly, insightful, intelligent individuals helping new users solve problems. the vast majority of my questions were solved by simply searching. most n00b questions have already been answered, many with multiple suggestions and updates as things change. the forums are also a "direct" link with other users and developers. they have posts asking the community for suggestions for new releases, posts about new software, and other topics related to the linux world. but this community is not only made up of #! users, there are many who use debian proper, or other debian variants, archers, even a few ubuntu users.

    dot files

    like many other linux users i keep a git repo of my dotfiles, the ui configuration files that make my personal linux system look and act the way it does. you can check them out on my git server or on github.

    the voyage continues

    it's now been a year since i embarked on my linux journey and it's far from over. i have long since deleted my windows partition, and have never looked back. that's partially thanx to wine, a tool that allows you to run windows software in linux. and partially due to the great free software available to linux users. linux gives you, the user, the freedom to use your machine the way you want it. it's open nature allows you to tweak ever minute detail of your system. yes allows, unlike windows which i was constantly hacking part to change things, which inevitably leads to system instability and/or lack of security.

    i highly suggest giving linux a chance. it does have a learning curve, but how steep is based on which distro you select. mint and ubuntu are very windows-esque, and thus have a low barrier to entry. but "power-users", like myself, can choose to dive a deeply as you desire. linux is what you make it.

    S=? E| 11;IA ~switching_to_linuxswitching to linuxdistrohoppers anonymous

    linux screen shot

    switching to from windows to linux is one of the best choices i have made in years. the freedom it provides is unparalleled. the fact that it's 100% free, the open nature of it's development, the community focus, and the abundance of free software was enough to convince me to give it a try.

    linux screen shot

    switching to from windows to linux is one of the best choices i have made in years. the freedom it provides is unparalleled. the fact that it's 100% free, the open nature of it's development, the community focus, and the abundance of free software was enough to convince me to give it a try.

    farewell windows

    i have been a long time windows user, it's served me well over the years. but recently i have become overwhelmingly sick of all the issues related to running it. every month (patch tuesday, inevitably followed by exploit wednesday) there's a plethora of updates, none of which ever seem to be related to security or stability. the so called windows "command line" is the saddest excuse for a terminal i have ever had the displeasure of using. and the "new" version, windows 8, has taken 10 steps back in terms of usability. the metro ui looks like AOL in the 90's, everything is hidden away from the user, it takes all your previous knowledge about your OS and tosses it in the trash.

    to be fair, i've had some linux experience before. in college we learned how to install it and connect to it via samba. i was given numerous live CDs featuring distributions like ubuntu, kororaa, and knoppix. i don't know why, but at the time i just wasn't interested in learning an entirely new OS. maybe my reluctance was based on the fact that i was still satisfied with my windows experience, maybe i was "too busy" learning new programming techniques, maybe it was fear of change. but whatever the reason, i just sort-of wrote linux off as a server OS.

    the terminal

    recently i have been using the terminal more and more. with the advent of GIT, i had started using MinGW. this added *nix like commands to windows. the more i used it the more i realized i was trying to force windows to be linux. i would research how to do something in linux then have to decide how to pull that off in windows. i learned to love the simplicity to move files with a single command versus dragging and dropping between two windows. the more i use the terminal the more i hate the mouse. have you ever tried to manually rename more than 100 files in windows? it's a painfully long process. with one command and some regex (regular expressions) you can do it in a few seconds from the te* 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

    crontab file syntax

    the file can be separated into two parts:

    • the interval to run the job
    • the command to be executed

    here's a cheatsheet for the interval syntax

      .---------------- Minute (0 - 59)
      |  .------------- Hour (0 - 23)
      |  |  .---------- Day of the Month (1 - 31)
      |  |  |  .------- Month (1 - 12)
      |  |  |  |  .---- Day of the Week (0 - 6) (Sunday=0 or 7)
      |  |  |  |  |
      *  *  *  *  *  example-script.sh
    

    here's an example entry:
    this job would run every half an hour on monday through friday.

    30 * * * 1-5    echo "cron job executed"
    

    valid time values

    Minute          0-59 (* every minute at the start of each minute)
    Hour            0-23 (* every hour at the start of every hour)
    Day of Month    0-31 (* every day)
    Month           1-12 (* every month, you can use month names if you prefer)
    Day of Week     0-7  (0 and 7 both mean sunday, again you can use names - see below)
    

    an alternative to the six field crontab syntax would be the two field option which consists of two fields the date / time and the actual command.

    here's a list of the most common @ options for cron:

    @reboot     -   runs when the machine is started up or if the cron daemon is restarted
    @midnight   -   runs once a day at midnight (the equivalent of 0 0 * * *)
    @daily      -   alias of @midnight
    @weekly     -   runs once a week on sunday (the equivalent of 0 0 * * 0)
    @monthly    -   runs once a month on the first day of every month at midnight (the equivalent of 0 0 1 * *)
    @annually   -   runs once a year at midnight on the first day of the first month and (the equivalent of 0 0  1 1 *)
    @yearly     -   alias of @annually
    

    email results

    on the very first line of the crontab file you can specify an email address to send the results of the job to. using the following syntax: MAILTO=cron@xero.nu

    the raw output of your job is will be emailed to the supplied address. the results could be echo statements, html, xml, json, whatever.

    examples

    on march 12th at 7:45pm load the http://xero.nu/cron/job page

    45 19 12 3 * curl --silent --compressed http://xero.nu/cron/job

    chaining multiple commands is exactly like regular shell commands. link them with &&, ||, or ;

    @midnight cd /var/www/xero.nu/ && php cron.php

    every night at midnight load the http://xero.nu/cron/job/2 with the supplied username/password

    @daily curl -u username:password --silent --compressed http://xero.nu/cron/job/2

    a note about passwords in cron jobs

    if your password contains a special character (it should!) that might interfere with your bash script's execution, simply escape the character with a prepending backslash. so if your password was `P4s$w0rd!` use:

    @daily curl -u xero:P4s\$w0rd\! --silent --compressed http://xero.nu/cron/job/3

    timezone pitfalls

    an important note about cronjobs is the fact that the execution time is tied directly to the server's time. make sure the server's time is in the timezone that you expect before setting up your jobs. execute the `date` command on the server and look at the time code on the end of the results.

    Thu Apr 18 11:52:19 EDT 2013

    the EDT suffix indicates the server is running on Eastern Daylight Time so it would execute in our local east coast time taking daylight savings into account.

    Thu Apr 18 11:52:19 UTC 2013

    the UTC suffix indicates the server is running on Coordinated Universal Time so the server's time is four hours *ahead* of our local east coast time.

    SMdo  } +?ek linux_cron_jobscron jobsautomating 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

    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>npm v1.4.x (packaged with node)
    • git
    • gnome keyring dev

    install the dependencies:

    sudo apt-get install libgnome-keyring-dev python2.7 git git-core

    you can also install nodejs via apt-get, but as of right now it's not the most recent version. see the nodejs wiki for install instructions.

    setup python:
    to ensure that gyp uses python 2
    * personally i did not do this. since i don't have python 3 installed *

    npm config set python /usr/bin/python2 -g

    clone the repo & enter the directory:

    git clone https://github.com/atom/atom 
    cd atom

    now, there are three ways to actually build atom:

    #1. create the application at /tmp/atom-build/Atom

    script/build

    #2. installs command to /usr/local/bin/atom

    sudo script/grunt install

    #3. generate a .deb package at /tmp/atom-build

    script/grunt mkdeb

    i personally opted for the first one, just to see if it would work (but if i was going to do this again i'd chose option #2). after building (there were a number of warning in the build script) i moved the files from /tmp/atom-build/Atom to /opt/atom/ and symlinked it into my path.

    installing on ubuntu via ppa

    to install on ubuntu 14.04, 13.10 or 12.04, make sure the dependencies are met and run:

    sudo add-apt-repository ppa:webupd8team/atom 
    sudo apt-get update 
    sudo apt-get install atom

    installing on arch via the AUR

    archers should use their usual work-flow for the AUR: atom latest release | atom git

    installing on mac osx

    just download and run the official installer.

    installing on windows

    checkout the windows build instructions in the atom docs.

    initial impressions

    atom is quite fast (although load time is a bit slower sublime, but it's still beta). the ui is quite nice, and should be very familiar to sublime users. it seems like github's plan is to create a clone of sublime's features then build upon them, and it seems like they have almost all the bases covered already. the plugin system is quite nice. i actually think i like it a little better than sublime's package manager. but we'll see what happens when they have the vast number of packages sublime has. i like the very tight git integration into the gui (though i have already achieved this in sublime with plugins). they have a great number of supported syntaxes already. code completion has great coverage, although it seems a bit slow. themes are broken into two classes: ui and syntax. there are not many themes available yet, but they all seems pretty nice. my biggest gripe with atom themes is they chose LESS over SASS. but that's more of a personal preference thing for me than anything.

    i'm very excited to see where this application goes. since it's os / community backed i expect big things. but i'm not ready to uninstall sublime quite yet.


    sources

    Sk --H~ ??e/ atom_editor_linux_installatom editor linux installrunning github's open source text editor

    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.

    this quote really sums it up perfectly:

    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

    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.

    this quote really sums it up perfectly:

    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

    the project is open source under the MIT license. you can checkout the repo's here.

    let me start off by saying i use the sublime text editor all-day, everyday. it's the editor of my dreams. it's super fast, has great syntax highlighting, spell checking, code completion, support for tons of languages and build systems, an awesome package control system, theme support... i can keep going. i can also say the sublime is the first application i have PAID for in many years. so when i read that github was building an open source alternative i was immediately intrigued.

    until now atom has only been available for beta testing on mac osx. but today they released the source code! which means that developers for the big three (mac, windows, & linux) can now build and install the app themselves.

    installing on #! / debian

    for installation on debian based systems you will need to compile it yourself. it's simpler than it sounds.

    requirements:

    • os with 64-bit architecture
    • python 2.x
    • node.js v0.10.x
    • my dotfiles

      i keep a git repo at http://code.xero.nu/dotfiles and a mirror on github http://git.io/.files, just in case. as of writing my dotfiles contain configs for awesomewm, compton, figlet, git, herbstluftwm, midnight commander, ncmpcpp, pacman, sublime text, vim, urxvt, zsh and more.

      how it works

      by default the stow command will create symlinks for files in the parent directory of where you execute the command. so my dotfiles setup assumes this repo is located in the root of your home directory ~/dotfiles. and all stow commands should be executed in that directory. otherwise you'll need to use the -d flag with the repo directory location.

      to install most of my configs you execute the stow command with the folder name as the only argument.

      to install my herbstluftwm theme use the command:

      stow herbstluftwm

      this will symlink files to ~/.config/herbstluftwm and various other places. if you clone or browse my dotfiles repo and look in the herbstluftwm folder, you'll find a .config/herbstluftwm directory structure identical to what the stow command just symlinked into your home directory. if you edit the autostart file in the dotfiles herbstluftwm folder it will automatically be updated in the file symlinked in your home directory.

      this command effected your home directory because that's where the repo is located, but you can override the default behavior and symlink files to another location with the -t (target) argument flag.

      to install the ryu-login you need to execute the command:

      stow -t / ryu-login

      this will symlink the file to /etc/issue. if your user does not have access to edit /etc simple execute the command again with sudo.

      sudo !!

      ** note: **

      stow can only create a symlink if a config file does not already exist. if a default file was created upon program installation you must delete it first before you can install a new one with stow. this does not apply to directories, only files.

      tl;dr

      navigate to your home directory

      cd ~

      clone the repo:

      git clone http://git.xero.nu/dotfiles.git

      enter the dotfiles directory

      cd dotfiles

      install the zsh settings

      stow zsh

      install the root zsh settings

      sudo stow zsh-root -t /root

      install awesomewm theme

      stow awesome

      uninstall awesome theme

      stow -D awesome

      install herbstluftwm

      stow herbstluftwm

      previews

      coils awesome ghosts coverge night city U5r V K9'-q managing_dotfiles_with_gnu_stowmanaging your dotfileswith gnu stow

      preview of xero's shell

      in the *nix world programs are configured in two different ways, via arguments in the terminal or text based configuration files. programs which have many options like your shell, window managers, or even text editors are configured on a per-user basis with files in your home directory ~. in unix like operating systems any file or directory that starts with a period or full stop character is considered hidden, and in a default view will not be displayed. thus the name dotfiles. it's been said of every console user:

      you are your dotfiles

      i manage mine with gnu stow, a free, portable, lightweight symlink farm manager. it allows me to keep a versioned directory of all my config files that are virtually linked into place.

      preview of xero's shell

      in the *nix world programs are configured in two different ways, via arguments in the terminal or text based configuration files. programs which have many options like your shell, window managers, or even text editors are configured on a per-user basis with files in your home directory ~. in unix like operating systems any file or directory that starts with a period or full stop character is considered hidden, and in a default view will not be displayed. thus the name dotfiles. it's been said of every console user:

      you are your dotfiles

      since they dictate how your system will look and function. to many users (see ricers and beaners) these files are very important, and need to be backed up and shared. people who create custom themes have the added challenge of managing multiple versions of them. i have tried many organization techniques. and just take my word for it when i say, keeping a git repo in the root of your home directory is a bad idea. i've written custom shell scripts for moving or symlinking files into place. there are even a few dotfile managers, but they all seem to have lots of dependencies. i knew there had to be a simple tool to help me.

      i now manage my dotfiles with gnu stow, a free, portable, lightweight symlink farm manager. it allows me to keep a versioned directory of all my config files that are virtually linked into place via a single command. this makes sharing these files among multiple users (mine, root, xmbx, etc) and computers (desktop, laptop, webserver, htpc) super simple. and does not clutter your home directory with version control files.

      installing

      stow is available f!Interface" target="_blank">UEFI bios and will be using gummiboot as my boot manager.

      start by downloading the arch linux install medium and burning it to a usb stick or cd. boot to the install medium (check your bios boot order) and you will be greeted by the prompt:

      root@archiso ~ #

      quick note about sudo

      in an attempt to keep this post cleaner, i will only mention the commands needed. if permissions errors arise, preface commands with sudo as necessary.

      internet

      the first test is getting your internet working. out of the box there is a good chance your wifi will not work. so i start the install process via ethernet. start dhcp and try pinging a site to test your connection

      • dhcpd
      • ping www.google.com -c 3

      if ethernet is not an option you can try android/iphone tethering.

      view drives

      next you'll need to take a look at your drives and decide on a partitioning scheme.

      • lsblk
      • lsblk -f

      partitioning SSD

      • gdisk /dev/sdb
      • o (delete all)
      • n (new)

        efi boot

        • choose 1 to select 1st partition.
        • Leave start sector at default by pressing Enter
        • change end sector to +512M (it is important to keep it at this size).
        • For the type enter the code ef00 (EFI).

        root

        • use all the defaults!
        • choose 2
        • leave start
        • leave end
        • type 8300
      • p (check tables)

        Number    Start         End         Size    Code   Name
        1          2048     1050623    512.0 MiB    EF00   EFI System
        2       1050624    62533262     29.3 GiB    8300   Linux Filesystem
      • w (write the changes)

      partitioning HDD

      • gdisk /dev/sda
      • o (delete all)
      • n (new)
      • home

      • use all the defaults!
      • choose 2
      • leave start
      • leave end
      • type 8300
      • w (write the changes)

      check your work

      • lsblk

      create file systems

      • mkfs.fat -F32 /dev/sdb1
      • mkfs.ext4 /dev/sdb2
      • mkfs.ext4 /dev/sda1
        • if you made a swap:
        • mkswap /dev/sdaX
        • swapon /dev/sdaX

      check your work

      • lsblk -f

      mount the file systems

      • mount /dev/sdb2 /mnt
      • mkdir /mnt/boot
      • mkdir /mnt/home
      • mount /dev/sdb1 /mnt/boot
      • mount /dev/sda1 /mnt/home

      install the base system

      • pacstrap /mnt base base-devel

      setup fstab

      • genfstab -U -p /mnt >> /mnt/etc/fstab

      configuring the system

      • arch-chroot /mnt

      you will be greeted with the prompt:

      sh-4.3#

      create locale file

      • remove the "#" in front of the locale(s) you need, en_US.UTF-8 in my case
      • vim /etc/locale.gen

      save the file and generate the locales

        "
      • locale-gen

      locale.conf

      • echo LANG=en_US.UTF-8 > /etc/locale.conf
      • export LANG=en_US.UTF-8

      setup the hostname, envy in my case

      • echo envy > /etc/hostname

      install the bootloader

      the mount command will most likely result in an error/warning due to it being loaded already.

      • mount -t efivarfs efivarfs /sys/firmware/efi/efivars
      • pacman -S gummiboot
      • gummiboot install

      create a configuration file to add an entry for Arch Linux to the gummiboot manager

      • vim /boot/loader/entries/arch.conf

      the contents of arch.conf file should be:

      title Arch Linux
      linux /vmlinuz-linux
      initrd /initramfs-linux.img
      options root=/dev/sdb2 rw

      ^ note the value of root should be your root partition (not boot).

      make sure we have a network connection after we reboot

      • systemctl enable dhcpcd.service

      set root password

      • passwd

      create a user, xero in my case

      • useradd -m -g users -G wheel -s /bin/bash xero

      create a password for user

      • passwd xero

      add user to the sudoers group

      • echo 'xero ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

      exit out of the chroot, unmount and reboot

      • exit
      • umount -R /mnt
      • remove the install medium
      • reboot

      if the system boots:

      • victory dance!

      post install

      enable the multilib repository

      • vim /etc/pacman.conf

      find the following lines and remove the "#" in front of them and save.

      • [multilib]
      • Include = /etc/pacman.d/mirrorlist

      using pacman

      pacman is the arch linux package manager. since arch is a rolling release distribution you will be using it a lot to install, remove, and update binary packages on your machine. here's a quick rundown of the most common commands:

      • search for a package

        pacman -Ss name
      • install a package

        pacman -S name
      • remove a package

        pacman -R name
      • update a package

        pacman -U name
      • update all packages

        pacman -Syu
      • count installed packages

        pacman -Qu | wc -l

      sync the package databases

      • pacman -Sy

      install xorg

      • pacman -S xorg-server xorg-server-utils xorg-xinit mesa

      video card drivers

      it's intel in my case, but might be different for you! check out the arch wiki for more information.

      • pacman -S xf86-video-intel

      trackpad drivers

      • pacman -S xf86-input-synaptics

      what to do when things break

      when updating with pacman -Syu sometimes things will break. if you update often, less new packages are introduced to your system at a time. this makes debugging and/or reverting offending packages easier. but here's the steps for recovery from say, a kernel panic.

      • boot the arch install iso (some suggest to install it as a recovery partition)
      • mount your partitions (run lsblk and df -h to view current drive labels, because the arch iso sometimes gets mount name precedence and will change their normal labels.)
        • mount /dev/sdb2 /mnt
        • mount /dev/sdb1 /mnt/boot
        • mount /dev/sda1 /mnt/home
      • chroot

        • arch-chroot /mnt /bin/zsh or arch-chroot /mnt /bin/bash depending on your shell preferences
        • downgrade packages. make sure you chose the old package name. remember you're not uninstalling, you're "updating" to an older version.
        • cd /var/cache/pacman/pkg
        • pacman -U old_package_name.pkg.tar.xz
          • in the case of a kernel issue revert both the linux kernel package as well as linux-headers.
      • exit chroot
      • systemclt reboot reboot

      time

      • timedatectl status
      • timedatectl list-timezones
      • timedatectl set-timezone America/New_York
      • timedatectl set-time "2014-05-31 04:20:09"
      • ^ obviously use the correct localtime!

      internet setup

      check the configuration of your /etc/hosts file, a valid configuration looks something like this:

      #<ip-address>  <hostname.domain.org>    <hostname>
      127.0.0.1      localhost.localdomain    yourHostname
      ::1            localhost.localdomain    yourHostname

      install the network tools

      this will install both the necessary system packages as well as the gui network manager applet, because i'm lazy and it doesn't load all the gnome dependencies.

      • pacman -S wpa_supplicant wireless_tools networkmanager network-manager-applet gnome-keyring

      make the networkmanager start on boot:

      • systemctl enable NetworkManager.service

      disable dhcpcd

      since networkmanager wants to be the one who handles the dhcpcd related stuff, you have to disable and stop dhcpcd:

      • systemctl disable dhcpcd.service
      • systemctl disable dhcpcd@.service
      • systemctl stop dhcpcd.service
      • systemctl stop dhcpcd@.service

      enable wifi

      enable the wpa_supplicant to use your wireless connection:

    • systemctl enable wpa_supplicant.service

    permissions

    add your user to the network group:

    • gpasswd -a xero network

    turn off network interface controllers

    use your own device names from the result of the ip link command if not eth0 and wlan0

    • ip link set down eth0
    • ip link set down wlan0

    start the networking services

    • systemctl start wpa_supplicant.service
    • systemctl start NetworkManager.service

    reboot and your networking should be ready.

    if the hardware switch is still disabled:

    • systemctl enable rfkill-unblock@all.service
    • and if that *still* doesn't work, perhaps try booting into another os, enable your wifi then hard power off the device.

    at this point you should have a working system ready to build. from this point you can install your dotfiles and the desktop environment or window manager of your choice and start crafting (ricing) your personal system. i will be talking about this more in a upcoming post.

    UM q 9q< S5e vimvimwhy i use an editor from the 1990's

    contents

    vim

    contents

    • editor vs ide
    • simple
    • everywhere
    • vim
    • help
    • configurable
    • extensible
    • multiple files
    • interface
    • sometimes you find the need to do mass string replacements in your mysql/maria databases. here's how i do it:

      UPDATE your_table
      SET your_field = REPLACE(your_field, 'old_value', 'new_value')
      WHERE your_field LIKE '%old_value%'

      sometimes you find the need to do mass string replacements in your mysql/maria databases. here's how i do it:

      UPDATE your_table
      SET your_field = REPLACE(your_field, 'old_value', 'new_value')
      WHERE your_field LIKE '%old_value%'
      P3 !!'[= arch_linuxarch linuxinstall guide

      this is my arch linux install guide. it's not meant to replace the beginners guide or the install guide, but act as a quick overview of exactly what the install process entails. hopefully this will encourage those intimidated by the terminal only install process.

      this setup is for my HP Envy 6t-1000 laptop. it has a 32gb ssd drive with two partitions for boot and / and the other 500gb hdd is my home. my laptop has plenty of ram so i do not use a swap. my laptop also has UEFI bios and will cover it's install procedure.

      boot to the install medium and you will be greeted by the prompt:

      root@archiso ~ #

      this is my arch linux install guide. it's not meant to replace the beginners guide or the install guide, but act as a quick overview of exactly what the install process entails. hopefully this will encourage those intimidated by the terminal only install process.

      this setup is for my HP Envy 6t-1000 laptop. it has a 32gb ssd drive with two partitions for boot and / and the other 500gb hdd is my home. my laptop has plenty of ram so i do not use a swap. my laptop also has shell commands

    • file searching
    • random vim tips
    • learning & tutorials
    • wrap up

    editor vs ide

    a text editor is a tool for editing plain text files. they have features like file and file system navigation, file io, modification, undo, search and replace, spelling and grammar checking, and more. but in this article we're talking about a type of editor referred to as source code editor. beyond the aforementioned functions their features include code detection, syntax highlighting, indentation and formatting, brace matching, code completion, etc.

    IDE is an acronym for integrated development environment, it's a suite of programs that work together in a "portable environment" that assists you in writing software. an editor is just one component of an IDE's toolchain. main features include things like code completion, code navigation, error checking, debugging, build automation, versioning, etc. most IDEs are designed for a specific language or related subset of them.

    being a long time programmer of a variety of languages i have used both at different times in my career. some "corporate" languages (cough microsoft! cough) like visual basic force you to use their IDE designed for their proprietary suite of tools. but many non-compiled and scripting languages let you write their code however you like. some editors like sublime text can be used for a multitude of languages while others like racket are designed to work with only one.

    if you sit around coding java all day, i'm sorry, then maybe using and full blown IDE like Eclipse, Android Studio, or IntelliJ is for you. but on any given day at my current job i will edit files in php, javascript/json, css/sass/stylus, shell scripts, markdown, config files, and a variety of others. i want an editor flexible enough to handle a wide variety of programming languages.

    simple

    if you adhere to the unix philosophy "dotadiw" or "Do One Thing and Do It Well", many IDE features break this separation of concerns. don't get me wrong, i understand that one of the most alluring attributes of an IDE is that you have your entire toolchain all in one place sharing the same user interface. but i subscribe to the unix as my ide mentality. as a shell user, your tools already work in the same common ui paradigm of text streams and files as persistent objects. i don't need my editor to understand the intricacies of any language, it just needs to know how to query and interpret or simply display the responses of external tools.

    everywhere

    another important factor for me is remote editing. even though we live in the future where your production website code is automatically deployed via post commit hooks in version control software, you still find yourself poking around and tweaking the code on remote machines. most *nix based/like operating systems come with ed, vi/vim, emacs, nano, and sometimes a few other editors. ed the standard editor is too terse and nano is too simple for me. i already feel like i have &carpal tunnel syndrome, so emacs is out. it also seems bloated to me, being that it's an editor as well as a client for mail, irc, news, web, etc. while vim is often available, sometimes only vi or micro-versions are available like nvi, the busybox tiny-vi clone, or the ATARI/UNIX/MS-DOS/OS2/QNX xvi implementation.

    vim

    i choose vi/vim the shell based, fast, extensible, multi-language editor focused just on editing code that's available on any *nix based operating system as well as other platforms. vi is a modal editor, meaning it works differently depending on the current mode. it operates in either insert mode where typing text appends it to the document or normal mode where keystrokes are interpreted as commands used to navigate and edit the document.

    your first challenge when using vim is learning the motions: h, j, k, l are used to move the cursor position up, down, left, and right. you can still use the arrow keys but vim masters will flame you saying things like: "you loose precious seconds (of your life) moving your hands from the home row to reach down for the arrows." like the motions, normal mode commands can be simple like w to jump forward a word. or more complex combinations of operators, counts and motions, for instance 2d3w deletes six words.

    vi style editors promote a keyboard focused workflow that doesn't rely on multiple simultaneous key presses or the mouse. which for shell users just makes sense. vim (Vi IMproved) is an extended version of the vi editor adding new modes like visual for highlighting and replace also known as overtype mode, among others. it also adds features like syntax highlighting, file completion and comparison (vimdiff), regular expressions, folding, compressed file editing, horizontal and vertical split or tabbed windows, multi-level branched undo/repo history, mouse support (for heretics) and a lot more.

    in normal mode ex commands are prefaced with a colon. depending on your settings, when you press : and start typing then press the tab key to activate the completion and suggestion engines. entering :w and pressing tab will give your suggestions like :wincmd, :write, :wq, and more. user defined functions must begin with a capital letter, and also will be available for completion. if you want to exit command input mode with out running anything press ^c (in this notation ^ is ctrl). when entering commands in a .vimrc file the colon notation is implied. for the rest of this article i will omit them from commands in that style. to get the master list of all ex commands enter help holy-grail.

    i think it's important to say: "vim is an editor, not an IDE". you can go wild extending vim with plugins and make vim into an IDE, but at it's core it's just an editor. use it how you like, but it's main goal is to edit text.

    help

    the mark of intelligence is not knowing everything, but knowing how to find the answers for yourself. my shell command history is littered with requests for man pages. i just ran vim .zhistory and %s/;man//gn, it yielded 15 results. so 1.5% of all my commands were asking for help. vim also has amazing documentation. enter the help command to view the help overview in a new buffer. the pages are just text so you navigate and search them as usual. you can search help with h pattern, if you set wildmenu tab completions will display a selectable list of suggestions.

    configurable

    for the most part, vi just works the way it's designed, while vim is highly configurable. many distributions include a basic config file, but user defined configurations are loaded from the .vimrc file in the home directory ~ of the user running the program. keep that in mind when running sudo vim or the more appropriate sudoedit (symlinks ftw). user configurations range from very simple vanilla ones to files hunderes of lines long brimming with comments, settings, custom key mappings, functions, plugins and the like. my vim guru taught me that when learning how to use vim you should start with a minimal configuration to learn how the editor itself works. then, when you gain a deeper understand, slowly begin to tweak it to your liking.

    it is common to first set nocompatible and enable vim's extended features, though in newer versions this is set automatically upon loading a user defined .vimrc file. other common settings include custom indentation sizes with shiftwidth, tabstop, and expandtab.

    you can also define your own commands to automate common tasks or quickly perform complex ones. one i use pretty often mapped to J is command J :%!python -mjson.tool this takes the contents of the current buffer and passes it to the python utility to pretty print a json file then reads back in it's results and replaces the current buffer with it's output.

    you can also remap commands and completely configure it to work exactly the way you like. i try not to use these because you tend to rely on them then get frustrated if they are not set or available in your current instance. early in my vim pilgrimage i was setting nnoremap ; : this allows you to prefix your ex commands with ; as opposed to the default :, i call it lazy shifting. but this would trip me up every time i was in vi. but since vim uses both ; and : things can get crazy quick. still, some swear by things like nnoremap <C-j> <C-w>j for faster and more semantic window movements. and vim gives you the freedom to do so.

    and this is just scratching the surface of what's possible. while i suggest looking at other peoples dotfiles and learning new things, i don't advise using someone else's exact .vimrc. you should understand, and want, every line in that file since it dictates exactly how your editor will function.

    since vim is configured by a simple text file, when it comes to editing on remote machines you can just use the default settings but it's trivial to add your own config file. you can copy+paste the contents manually, use a tool like curl or rsync to retrieve it and write it to a file curl -sL http://git.io/.vimrc-min-curl > ~/.vimrc, or if you are like me and keep your dotfiles under version control you can just do a git clone (and a sparse checkout if you only want one program's configs) and stow or symlink the files into place.

    extensible

    vim is endowed with a plugin system written in it's own language vimscript. it has a long history of working in different ways, but as of this writing vundle is the current standard. it allows you to install, remove, and configure plugins from your .vimrc file. the BundleInstall command will even clone all the necessary files from github or vim.org for you. plugins can be simple or very complex. the number of plugins and their complexity will effect load time, so keep it light. i often disable plugins when editing o(n remote machines.

    some of my favorite plugins include:

    gitgutter which shows a git diff in the 'gutter' (sign column). it shows whether each line has been added, modified, and where lines have been removed. you can also stage and revert individual hunks.

    in normal mode when selecting an opening brace or bracket { pressing the % key will move to it's matching closing character. the plugin matchit extends this base functionality adding support for matching by whole words, regular expressions, and other language specific items for html, latex and others.

    YouCompleteMe is a fast, as-you-type, fuzzy-search code completion engine. it's results hook into the omnicomplete system to provide semantic completions for many languages with the ability to configure to your needs.

    syntastic is a syntax checking plugin that runs files through user configured external linters and displays any resulting errors to the user. this can be done on demand, or automatically as files are saved.

    interface

    i personally like syntax highlighting. so setting syntax on is a must for me. depending on your terminal emulator vim can display from 16 to 256 colors. there are a lot of color schemes out there, i made my own called sourcerer. you add the files to ~/.vim/colors/ or put their contents directly in your .vimrc then set them with colorscheme sourcerer.

    line numbering can be another important tool when debugging. to display them use set number, or add a exclamation point as a negation set number! to disable them. another new option is set relativenumber which numbers the lines relative to the cursor rather than absolutely. you can jump to any line by entering it's number as a command. jump to line 10 with :10.

    another visual configuration is your statusbar. while the default is "satisfactory" to get the job done. most ricers configure a nicer one. you can write your own, but there is a lot to take into account. meta data about the file like name, type and encoding, vim's current mode, file modifiability, and other very complex things like placement if multiple buffer windows are visible. so most people use a plugin. powerline and airline are very popular but i prefer to use lightline to create a custom one. like others i use the background color of the filename section of the bar to represent the current mode. i also use fugitive to add git branch and status information to the bar.

    multiple files

    a buffer is the in-memory text of a file. you can have numerous buffers open at once. use ls to list the available ones. bn buffer next and bp buffer previous allow you to switch between them. bd buffer destroy will remove the current one.

    a window is a viewport of a buffer. use sp and vs to horizontally or vertically split the screen to display multiple buffers. pressing winc and a motion hjkl to move your focus. you can also use ^w and the arrow keys to move around. or press ^ww to cycle through them. you can resize windows with winc or ^w and <>-+= for left, right, up, down, and equally respectively. but since this is a single increment it's better to prefix it with a count like 30winc> or 30^w>.

    a tab is a collection of windows. tabe )will open a new tab. tabn tab next and tabp tab previous will let you navigate between them. as you can see the concept builds from buffers (files) to windows (groups of buffers) to tabs (groups of windows).

    shell commands

    you can execute shell commands within vim by prefixing the command with an exclamation point. to display the contents of your home directory enter !ls -lah ~/. when you are done press enter and you will return to your previous view. if you combine this with the read command you write the results to the current buffer. to input the current epoch time use r !date +%s.

    file searching

    to open a new file you can use the edit command. set wildmode=longest,list,full, wildmenu and wildignorecase vim will give you case insensitive tab completion for filenames. entering e ~/.vimr and pressing tab will almost definitely complete to e ~/.vimrc and if it can't it will show you suggestions for things like e ~/.vimrc.bak and allow you to cycle and select the approprate one.

    for finding files there is a built in directory viewer called Explore. you can use Sex, Vex, or Hex to open the explorer in a vertical or horizontal split or Tex to open in a new tab. but sometimes nothing beats using your normal tools. remember the shell is always just a ^z away. when you're ready to bring vim back to the foreground use the fg command. tools like ls and find can help you find what you're looking for quicker than just scrolling through a directory tree. the ls -R flag lists files recursively for quickly viewing larger directory trees. use a pager like less for multi-screen output. the find command allows to pass a name flag for filename pattern matching and iname for case insensitive matching. to find all markdown formatted readme files find -iname 'read*me.md'.

    to search the current buffer prefix your pattern with a slash /. your pattern can be a string or regex. some examples /find, /end.$ and /[0-9][0-9]. if you set hlsearch your search results will be highlighted. if you set incsearch highlighting will occur live as you type. pressing n for next and N for previous lets you navigate through matches. use nohl to clear current highlighting (you will use that one a lot).

    once again, when it comes to searching for text across multiple files there are better tools available in the shell than in your editor. grep is the classic for string and regex searching. use it's -R flag to search recursively and add the i flag to remove case sensitivity. you can also use the l flag to display the filename as opposed to the matching text. to find all files containing the phrase console.log in the www directory use grep -ilR console.log /var/www.

    understanding how to search with the standard utilities that will be available on any machine is important. but when it comes to local searching i have been using the silver searcher's ag command, which boasts being an order of magnitude faster than tools like grep, awk, and ack, it automatically ignores version control files, and patterns defined in .gitignore files. it's syntax is simple ag pattern location so to search for class notation in php files in a given folder ag '\$this->' ~/code/php -G php. the -G flag is pattern matching for file name and/or extension. the -c flag will display the file location and count of matches, i often pipe this into word count by line to get a count of the matching files ag -c something ~/some/where | wc -l.

    ag has it's own plugin adding the Ag command to vim. it's results are displayed in a quickfix window. set let g:ag_highlight=1 your search results will be highlighted in the buffers as you open them. thoughtbot gave me the idea of mapping backslash \ to ag with nnoremap \ :Ag<SPACE>. so / searches the current buffer and \ searches another location.

    random vim tips

    fix indentation

    gg=G

    in normal mode, typing gg=G will reindent the entire file. this is a special case where = is an operator. just like d or y, it will act on any text that you move over with a cursor motion command. in this case, gg positions the cursor on the first line, then =G re-indents from the current cursor position to the end of the buffer.

    remove trailing white space

    remove all trailing white space (replace with nothing)

    :%s/\s\+$//

    remove blank lines

    remove duplicate blank lines

    :g/^\s*$/d

    spellcheck

    toggle the spell checker

    :setlocal spell! spell?

    learning & tutorials

    musings from my vim guru z3bra

    interactive:

    videos:

    books:

    wrap up

    no editor or IDE will make you a better programmer. no plugins, linters, or refactoring tools will make you write better code. they're all just tools to assit your brain. learning vim's motions and modal editing style might increase your overall coding speed, or it might be too complex and just annoy you.

    inb4...

    something something evil mode

    emacs users

    your toolchain is a very personal thing, and you should use what works best for you. everything in this article is my opinion, and should be taken as such. others might agree or fervently dissagree with me. and that's fine. i just wanted to get my feelings out there about, what i consider, to be the best editor for programming.

    V4<table being topaz. most amiga ansi was created to accompany warez scene releases, so they were often not seen outside the underground. so members of the amiga crews would release "collys", which are a collection of works usually by a single artist. over time, the amiga scene has continued on using modern versions of their classic fonts and adding PC style colors to their work. while the PC scene still had heavy ties to the warez scene, many of the groups focused on BBS art and advertisements. because of the standard terminal size of 80 characters and a weird bug that corrupted the buffer if the last column was used, all ANSI art from this time period adhered to a strict 79col rule.

    acid underworld bulletins screen

    around this time, the modern internet was born. people began connecting to dial-up isp's to reach larger networks as apposed to dialing up individual computers. this pushed the BBS scene further underground than before. eventually, a new BBS standard was adopted allowing for these legacy systems to be reborn and reached once again via telnet (and eventually ssh). and that's where we are today.

    acid underworld ansi gallery

    while it's technically possible to use a standard unix {,like} terminal to connect to a modern bbs, it's better to use a tool specifically designed for BBS'ing. my personal tool of choice is syncterm. it runs on linux, {open,free,net}bsd, osx, and windows. it supports all connection methods including telnet, rlogin, ssh, RAW, zmodem, shell, and direct serial connections. it boasts copy/paste features along with username/password saving and auto-completion. and it's biggest feature, is support for automatically setting and switching between multiple SCENE FONTS!

    ansi art uses a meta data format called "SAUCE", developed by the legends of ACiD productions. the sauce file, among other things, contains info about what font the art should be rendered in. this allows the sysops to use both PC and AMiGA style artwork on their boards and let's your client decided how to correctly render it.

    bitsunrise games menu

    while there are not nearly as many active boards today as there were back then, most of the ones that are still around are super high quality. containing custom artwork, door games, live chat, and cross-board communications.

    my friend grisk of impure released this list of awesome active bbs' as of 2016. but i'll highlight some of my personal favorites:

    • "under the black flag" - blackflag.acid.org
    • "alcoholiday" - alco.bbs.io
    • "blood island" - bloodisland.ph4.se
    • "bit sunrise/bit sunset" - bitsunrise.com / bitsunset.com
    • "1984" - 1984.ws
    • "the yard" - theyard.dyndns.org

    since this is by and large and underground scene, it's historically been quite exclusive and difficult for people to "see". but with the thankless help of internet hoarders, there are now multiple textmode preservation networks. some simply offer direct download links, while others offer interactive galleries to view these works of art. i'd like to take a moment and thank maze for all his hard work on textmod.es. it's an amazing site hosting the artwork of multiple generations of scenesters.

    acid underworld logoff screen

    V $$P C- bbs_scenebbs scenethe roots of ansi/ascii artacid underword bbs circa 2018

    i've been a long time fan of text mode art. i got my first glimpse into that world back in the nineteen hundred and nineties, with groups like ACiD and remorse. back in pre-modern internet days we had to dial up a BBS (bulletin board system) to chat or download files. over time, these systems became either mail/chat hubs or w4r3z distros. because of the questionable legality of some of these releases a login system was added to all BBS' (though many supported a "guest" login"). some had open registration while others were invite only.

    acid underword bbs circa 2018

    i've been a long time fan of text mode art. i got my first glimpse into that world back in the nineteen hundred and nineties, with groups like ACiD and remorse. back in pre-modern internet days we had to dial up a BBS (bulletin board system) to chat or download files. over time, these systems became either mail/chat hubs or w4r3z distros. because of the questionable legality of some of these releases a login system was added to all BBS' (though many supported a "guest" login"). some had open registration while others were invite only.

    alcoholiday new files menu

    the warez scene lead the way with .NFO files and FILE_ID.DIZ, these where text files accompanying the release describing them as well as the group (and often board) providing them. these files will adorned with the early scene ASCII art. but in this age, the terminal programs you used to call the boards utilized the ANSI character set. a larger set of 256 character inherited from IMB's CP437, it also contained special ANSI escape sequences that allowed for color text with the 16 foreground and 8 background colors provided by your shell. forward thinking ASCII artists used this power to create colorful works of art to adorn the BBS.

    the scene pushed forward, and the people creating this art banded together and formed art collectives (or "crews") where they released their work in "artpacks". eventually these groups moved beyond BBS ad/screens/art and starting creating "art for art's sake". the height of this scene (strictly according to the number of packs released at that time) was 1997, with over 800 packs being released that year alone.

    under the black flag bbs circa 2018

    when it comes to the textmode scene, there were generally two groups based around hardware: the pc scene and the amiga scene. the amiga scene revolved around the commodore amiga. their releases are often seen more as "ascii art" since they were without color, and featured a number of different ANSI fonts. the most no*  B? %%5 impure_asciiimpure asciiamiga style text art

    i've joined up with yet another ansi/ascii art group, this time it's some amiga scenesters called iMPURE!aSCii 1940 aka iMP. i have a few pieces in their new artpack #63.

    x0 - impure / xero graffiti logo

    i've joined up with yet another ansi/ascii art group, this time it's some amiga scenesters called iMPURE!aSCii 1940 aka iMP. i have a few pieces in their new artpack #63.

    x0 - impure / xero graffiti logo

    impure / xero graffiti logo
    view full size: png / txt / ans

    x0 - fsociety mask

    mr.robot / fsociety mask
    view full size: png / txt / ans

    WY: +ICQ  zelda_ascii_artlegend of zelda ascii/ansi artas a member of blocktronics

    my love of ansi/ascii art has been growing lately. i've joined up with the prolific group blocktronics aka 67. my first scene release is in artpack #16 "block n' roll".

    x0 - legend of zelda, link ascii/ansi portrait

    my love of ansi/ascii art has been growing lately. i've joined up with the prolific group blocktronics aka 67. my first scene release is in artpack #16 "block n' roll".

    x0 - legend of zelda, link ascii/ansi portrait

    my piece is a greyscale portrait of link, from the legend of zelda games.
    view full size: png / txt / ans

    W+ W FWk 7!!S' black_flag_bbs_bannerblack flagbbs banner

    just a quick banner for my new friend hawk hubbard aka captain hood of under the black flag bbs!

    x0 - black flag

    just a quick banner for my new friend hawk hubbard aka captain hood of under the black flag bbs!

    x0 - black flag

    black flag
    view full size: png / txt / ans

    XN !!YkS blocktoberblocktoberblocktronics' halloween themed artpack

    blocktronics' new halloween themed artpack #17 "blocktober" has been released! and i have a few new color pieces in this pack!

    x0 - toxic skull

    blocktronics' new halloween themed artpack #17 "blocktober" has been released! and i have a few new color pieces in this pack!

    x0 - toxic skull

    toxic skull
    view full size: png / txt / ans

    XCi -!3? night_city_asciinight citytextmode pittsburgh

    here's a new piece of ansi/ascii art that's near and dear to my heart. it's a textmode art view of my town, pittsburgh! it's drawn with the classic AMiGA font topaz and released this with impure!

    x0 - night city ascii

    here's a new piece of ansi/ascii art that's near and dear to my heart. it's a textmode art view of my town, pittsburgh! it's drawn with the classic AMiGA font topaz and released this with impure!

    x0 - night city ascii

    night city
    view full size: png / txt / ans

    Wi  f ''G1# impure_bannerimpure bannergraffiti style ansi/ascii art

    here's a new banner for iMPURE!aSCii 1940 released in artpack #64

    x0 - impure banner

    here's a new banner for iMPURE!aSCii 1940 released in artpack #64

    x0 - impure banner

    impure banner
    view full size: png / txt / ans

    X~ /+-#o defcon25_ansi_artdefcon ansi art25th anniversary

    happy 25th anniversary to defcon!!1!#@~ i cant join you at the party, but my ansi art can!

    and if you're brave enough, i made a shell script banger version!
    curl -L http://git.io/defcon

    x0 - defcon25 banner

    happy 25th anniversary to defcon!!1!#@~ i cant join you at the party, but my ansi art can!

    and if you're brave enough, i made a shell script banger version!
    curl -L http://git.io/defcon

    x0 - defcon25 banner

    defcon
    view full size: png / ans

    X S !!A]c amish_ansiA.M.i.S.H.ansi masters in straw hats
    A.M.i.S.H or Ansi Masters In Straw Hats (pennsylvania german: amisch, german: amische) a group of traditionalist ansi artists with pennsylvania dutch origins. they are closely related to, but distinct from, blocktronics, impure and other "english" art groups. the AMiSH are known for simple living, dope ansi skills, and reluctance to adopt many conveniences of modern technology.

    tl;dr - amish is a joke acronym that misfit and filth came up with in the 90s. but once i met up w/ them we decided that with all three of us representing the western pa area, we should make their dreams a reality!

    here's a few of my subs to our inaugural artpack:

    x0 - amish banner

    misfit, filth, and xeR0 proudly introduce the ansi/ascii scene's new group AMi5H!

    according to textmod.es:
    A.M.i.S.H or Ansi Masters In Straw Hats (pennsylvania german: amisch, german: amische) a group of traditionalist ansi artists with pennsylvania dutch origins. they are closely related to, but distinct from, blocktronics, impure and other "english" art groups. the AMiSH are known for simple living, dope ansi skills, and reluctance to adopt many conveniences of modern technology.

    tl;dr - amish is a joke acronym that misfit and filth came up with in the 90s. but once i met up w/ them we decided that with all three of us representing the western pa area, we should make their dreams a reality! 717 represent!

    here's a few of my subs to our inaugural artpack:

    x0 - amish banner

    amish banner
    view full size: png / ans

    x0 - amish barn bomber

    barn bomber
    view full size: png / ans

    Yld}  pQ %-9{9 cthulhu_ansicthulhu ansi arth.p. lovecraft textart

    this cthulhu piece was a request from my friend dcat.
    i released it with blocktronics in their "darker image" artpack.

    x0 - cthulhu

    this cthulhu piece was a request from my friend dcat.
    i released it with blocktronics in their "darker image" artpack.

    x0 - cthulhu

    cthulhu
    view full size: png / ans

    Z* %ECo impure_trainall aboard the impure train!the widest ascii/ansi colly

    the newest impure artpack #67 has the incarnation of a conversion we had on irc. historically amiga collys are all vertical and lack color. since impure is already viewed as a "modern" crew for releasing in color and files wider than 80 columns... we decided why not make a modern colly?! and what's the perfect subject for a really really wide ansi? a train covered in graffiti of course!

    x0 - impure train preview

    the newest impure artpack #67 has the incarnation of a conversion we had on irc. historically amiga collys are all vertical and lack color. since impure is already viewed as a "modern" crew for releasing in color and files wider than 80 columns... we decided why not make a modern colly?! and what's the perfect subject for a really really wide ansi? a train covered in graffiti of course!

    x0 - impure train preview

    we actually first released this file as a demo at pittsburgh's demosplash 2017, winning 2nd place in the modern demo category! watch / download the demo.

    Z:`  l #%3== gutter_emaggutter e-magansi art zine piece

    i was honored to be requested to do a piece for filth^67^AMiSH's e-mag GUTTER.

    x0 - gutter e-mag

    i guess i went a bit literal with it...

    i was honored to be requested to do a piece for filth^67^AMiSH's e-mag GUTTER.

    x0 - gutter e-mag

    i guess i went a bit literal with it...

    Zm /#3m grandpa_dan_asciigrandpa danansi/ascii portrait

    recently my grandfather died. he meant the world to me. i have so many great memories of him growing up. i consider myself quite lucky to have had him in my life as long as i did. to honor his memory/grieve i decided to do an ascii/ansi art portrait of his younger self. this was released in the impure artpack #67 and was my first time using the microknight AMiGA font.

    x0 - grandpa dan portrait

    recently my grandfather died. he meant the world to me. i have so many great memories of him growing up. i consider myself quite lucky to have had him in my life as long as i did. to honor his memory/grieve i decided to do an ascii/ansi art portrait of his younger self. this was released in the impure artpack #67 and was my first time using the microknight AMiGA font.

    x0 - grandpa dan portrait

    grandpa dan portrait
    view full size: png / ans

    ZG  , G77_a blocktronics_starwars_artpackblocktronics starwarsdetention block AA-23

    blocktronics is back! this time with a new starwars themed artpack called "detention block AA-23"

    x0 - join the empire

    blocktronics is back! this time with a new starwars themed artpack called "detention block AA-23"

    here's a few of my subs

    x0 - join the empire

    join the empire
    view full size: png / ans

    x0 - deathstar

    deathstar
    view full size: png / ans

    Y  _ ++EQo demosplash_2016demosplash 2016pittsburgh's demoscene event

    x0 - demosplash

    since joining the textmode art scene, i've made lots of new friends. blocktronics and impure have both been more art collectives than a release groups. seeing the art other members are working on is very inspiring and, for the most part, the criticism is constructive. over time i've become friends with misfit and filth, all members of blocktronics who live in pretty close proximity to each other. this year we decided to meet up at pittsburgh's local demoscene event demosplash, and had a blast!

    x0 - demosplash

    since joining the textmode art scene, i've made lots of new friends. blocktronics and impure have both been more art collectives than a release groups. seeing the art other members are working on is very inspiring and, for the most part, the criticism is constructive. over time i've become friends with misfit and filth, all members of blocktronics who live in pretty close proximity to each other. this year we decided to meet up at pittsburgh's local demoscene event demosplash, and had a blast!

    a demoscene event of demoparty is an event that gathers demosceners and other {retro,} computer enthusiasts to view and compete in competitions calls "compos". the compos a party hosts very from event to event, but always include categories for demos, text art, and audio. depending on the entries ansi/ascii might be split into pc and amiga or combined. similarly smaller parties sometimes combine non-text graphics and music into an audio/video compo. but generally speaking the compos are usually:

    • retro demo
    • moden demo
    • freestyle graphics
    • freestyle ansi/ascii
    • fresstyle audio

    this was the first time i met misfit and filth irl. filth was gracious enough to host us at his house before and after the party. we all seems to instantly hit it off, like we were old time friends. we talked about the scene, how we got introduced to it, what made us get involved, our art motivations, opinions on other artists/groups/art styles/etc, and lots more. and the whole time we were drawing. both passing around a notebook/markers and a laptop equipped with pablodraw. we spent so much time chatting and drawing we were almost late for the compo! (update: this was the real formation of the A.M.i.S.H.)

    x0 - demosplash

    this was also my first time attending a demoparty, competing in a compo, or even really showing off my art to someone not on the other end of the internet. we strolled into the party just in time, acting like we owned the place. and we did! our crew blocktronics took the top 8 spots in the compo, and i personally took third place!

    they handed the new friends a pile of trophies and we headed back to filth's place to celebrate with the spoils of victory!

    x0 - demosplash

    X L ++9WO demosplash_2017demosplash 2017pittsburgh's demoparty

    x0 - demosplash pretzels are traditional

    last year we had such a good time at demosplash that misfit, filth, and myself decided to do it again!

    x0 - demosplash pretzels are traditional

    last year we had such a good time at demosplash that misfit, filth, and myself decided to do it again! this time i decided to compete in both the ansi/ascii compo but in modern demo as well! hellbeard, the leader of impure, and i created a modern amiga colly that scrolls horizontally. so we decided to write a program to animate it. read/watch/download our demo: "all aboard the impure train".

    x0 - demosplash impure train live

    we won 2nd place. modern demo is a hard category for an animated ansi/ascii to compete in. congrats to the winners :D

    i was a little bit disapointed by the lack of ascii art flavor in last year's results file. so year year i made them a new one. (they changed my header font, but that's ok i guess, it's there party afterall)

    x0 - demosplash misfit w/ the 2nd place trophy

    like last year, we partied, chatted, drew, and had an awesome time! american demoscene is still a small affair compared to it's european counterparts. i invite everyone to join us next year and help make the event ever better!

    x0 - demosplash misfit w/ the 2nd place trophy

    Zconnection.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler); connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityErrorHandler); connection.connect(null); } private function netStatusHandler(evt:NetStatusEvent):void { switch (evt.info.code) { case "NetConnection.Connect.Success": stream = new NetStream(connection); stream.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler); stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR,asyncErrorHandler); video = new Video(); video.attachNetStream(stream); stream.play("lupinIII-s2e002-buns.guns.and.fun.in.the.sun.flv"); label.htmlText ="x-e.ro presents... \n lupin the 3d\n buns guns and fun in the sun"; break; case "NetStream.Play.StreamNotFound": label.text="flv not found..."; break; case "NetStream.Play.Stop": //loop video stream.seek(0); break; } } // _______________________________________________________________________ // event handlers private function asyncErrorHandler(evt:AsyncErrorEvent):void { } private function securityErrorHandler(evt:SecurityErrorEvent):void { label.text="security error..."; } // _______________________________________________________________________ // init3D private function init3D():void { this.container = new Sprite(); addChild(this.container); this.container.x = this.stage.stageWidth / 2; this.container.y = this.stage.stageHeight / 2; scene = new MovieScene3D( container ); camera = new Camera3D(); camera.z = -planeSize; camera.focus = 1000; camera.zoom = 1; bmpData = new BitmapData(TEXTURE_W,TEXTURE_H,false,0xff0000); material = new BitmapMaterial(bmpData); material.oneSide = true; planeObj = scene.addChild( new Cube( material, planeSize, planeSize, planeSize, segment, segment, segment) ); } // _______________________________________________________________________ // loop3d private function loop3D( event:Event ):void { valx -= 0.2; valy -= 0.5; planeObj.rotationY = valx; planeObj.rotationX = 35; video.attachNetStream(null); bmpData.draw(video); video.attachNetStream(stream); var filters:Array = new Array; filters.push(new GlowFilter(0xFFFFFF, 1, 10, 10, 10, 1)); filters.push(new DropShadowFilter(70, 55, 0x000000, 0.5, 9, 9, 1, BitmapFilterQuality.HIGH)); /* var blur:Number = 10*Math.sin( (++count/25) ); if(blur > 0){ filters.push(new BlurFilter(blur,blur,BitmapFilterQuality.HIGH)); } */ planeObj.container.filters = filters; this.scene.renderCamera( camera ); } // _______________________________________________________________________ // onStageResize private function onStageResize(event:Event):void { this.container.x = this.stage.stageWidth / 2; this.container.y = this.stage.stageHeight / 2; } }

    p.s. happy birthday to me!

    Fdu understand how connection strings are built, write your own other wise will can use the visual studio database tool to do that for us.

    configure database

    visual studio 2005 has a tool for connecting to a database called a "sqlDataSource". while this tool works, i find myself wanting to create the connection and build or execute stored procedures within my own C# code. this tutorial will show you how to connect to a sql database 3 different ways in asp.net

    the first thing is creating a connection with your database. if you understand how connection strings are built, write your own other wise will can use the visual studio database tool to do that for us.

    configure database

    drag a new sqlDataSource onto the canvas, highlight it, then click the little arrow that appears to reveal configure datasource. in the windows that follow you can create a new database connection or use an existing one. refresh the server list and select your database server or use localhost. then choose if you want to use windows integrated security (where the server is the database user) or sql server security (where you supply the sql username and password). then select the database you want to connect to on the server, and test your connection.

    select database

    press ok, and you will return to the previous window, click the little plus sign to expand and show the connection string that visual studio generated for you. copy it, and click cancel. now you can delete the sqlDataSource and switch to code view.

    database connection

    now the first thing we need to do is create a database connection in our code:

    SqlConnection con = new SqlConnection("Data Source=DEVELOPMENT;Initial Catalog=rss;Integrated Security=True");
    


    hardcoded procedure:

    int id = 13;
    con.Open();
    //---create procedure
    string select = "SELECT * FROM 'table' WHERE 'id' = @ID"; 
    SqlCommand command = new SqlCommand(select, Con); 
    //---paramerter adding
    command.Parameters.Add("@ID", SqlDbType.Int).Value = id;
    //---make a data reader
    SqlDataReader reader = command.ExecuteReader(); 
    while (reader.Read()) { 
       String data = reader["thing"].ToString();
    }
    //---close connection
    con.Close();
    


    using a stored procedure with one parameter
    (e.g. "DELETE 'tabelname' WHERE 'id' = @ID; ")

    int id = 42;
    con.Open();
    //---setup query
    SqlCommand commando = new SqlCommand("deleteUser", con);
    commando.CommandType = CommandType.StoredProcedure;
    //---paramerter adding
    commando.Parameters.Add("@ID", SqlDbType.Int).Value = id;
    //---execute the query
    commando.ExecuteNonQuery();
    //---close connection
    con.Close();
    


    using a stored procedure without any parameters
    (e.g. "SELECT * FROM 'tabelname'; ")

    con.Open();
    //---select a stored procedure
    SqlCommand commander = new SqlCommand("getFilename", con);
    commander.CommandType = CommandType.StoredProcedure;
    //---make a data reader
    SqlDataReader SQLreader;
    SQLreader = commander.ExecuteReader();
    while (SQLreader.Read()) {
       //---select data by array index
       String data  = SQLreader[0].ToString();
       //---select data by sql collumn name
       String data2 = SQLreader["name"].ToString();
    }
    //---close connections
    SQLreader.Close();
    con.Close();
    
    F9h to draw in flash, lol!

    after a quick conversation w/ andy zupko about the new Line3D object, and my new CanvasView3D component for papervision, i made a sweet lorenz attractor! 

    the algorithm is super simple:

    x1 = x0 + h * a * (y0 - x0);
    y1 = y0 + h * (x0 * (b - z0) - y0);
    z1 = z0 + h * (x0 * y0 - c * z0); 

    papervision3D lorenz attractor

    we were discussing recursive algorithms and chaos theory at work yesterday. when one of the chemistry professors brought up the lorenz attractor. he was trying to draw one on the white board for about 10 minutes until i decided it would be easier to draw in flash, lol!

    after a quick conversation w/ andy zupko about the new Line3D object, and my new CanvasView3D component for papervision, i made a sweet lorenz attractor! 

    the algorithm is super simple:

    x1 = x0 + h * a * (y0 - x0);
    y1 = y0 + h * (x0 * (b - z0) - y0);
    z1 = z0 + h * (x0 * y0 - c * z0); 

    A, B, and C are variables that get their values from form components in the application, while H is a constant that represent the angles of the curves dictated by segment size. x0, y0, and z0 are the origin vertex’s while x1, y1, and z1 are the destination points.

    besides the form objects for the A, B, and C values, the application features an event driven camera, that follows the drawing as it happens. as well as a hover camera, which lets your rotate the object in 3D. the actual lines that are being drawn are given a new material each render. that's how the color tweening effect is achieved. use the color picker box to select a valid color to start with. also, the algor run 3000 times, (getting slower and slower as it loops) press the generate button to erase the lorenz you already have a begin drawing a new one w/ the form values you have selected.

    a little background on the lorenz...
    the lorenz attractor is a 3D structure corresponding to the long-term behavior of chaotic flow. the visual “map” represents the evolution of a dynamic system, that complexifys and into a unique non-repetitious pattern. originally discovered by edward lorenz in 1963, the current algorithm is based on simplified version of his equations of convection rolls arising in the atmosphere. for detailed technical info check out math world and this article by dominic van berkel.

    click here to check out the demo
    then browse the source code

    GDwill open a new tab. tabn tab next and tabp tab previous will let you navigate between them. as you can see the concept builds from buffers (files) to windows (groups of buffers) to tabs (groups of windows).

    shell commands

    you can execute shell commands within vim by prefixing the command with an exclamation point. to display the contents of your home directory enter !ls -lah ~/. when you are done press enter and you will return to your previous view. if you combine this with the read command you write the results to the current buffer. to input the current epoch time use r !date +%s.

    file searching

    to open a new file you can use the edit command. set wildmode=longest,list,full, wildmenu and wildignorecase vim will give you case insensitive tab completion for filenames. entering e ~/.vimr and pressing tab will almost definitely complete to e ~/.vimrc and if it can't it will show you suggestions for things like e ~/.vimrc.bak and allow you to cycle and select the approprate one.

    for finding files there is a built in directory viewer called Explore. you can use Sex, Vex, or Hex to open the explorer in a vertical or horizontal split or Tex to open in a new tab. but sometimes nothing beats using your normal tools. remember the shell is always just a ^z away. when you're ready to bring vim back to the foreground use the fg command. tools like ls and find can help you find what you're looking for quicker than just scrolling through a directory tree. the ls -R flag lists files recursively for quickly viewing larger directory trees. use a pager like less for multi-screen output. the find command allows to pass a name flag for filename pattern matching and iname for case insensitive matching. to find all markdown formatted readme files find -iname 'read*me.md'.

    to search the current buffer prefix your pattern with a slash /. your pattern can be a string or regex. some examples /find, /end.$ and /[0-9][0-9]. if you set hlsearch your search results will be highlighted. if you set incsearch highlighting will occur live as you type. pressing n for next and N for previous lets you navigate through matches. use nohl to clear current highlighting (you will use that one a lot).

    once again, when it comes to searching for text across multiple files there are better tools available in the shell than in your editor. grep is the classic for string and regex searching. use it's -R flag to search recursively and add the i flag to remove case sensitivity. you can also use the l flag to display the filename as opposed to the matching text. to find all files containing the phrase console.log in the www directory use grep -ilR console.log /var/www.

    understanding how to search with the standard utilities that will be available on any machine is important. but when it comes to local searching i have been using the silver searcher's ag command, which boasts being an order of magnitude faster than tools like grep, awk, and ack, it automatically ignores version control files, and patterns defined in .gitignore files. it's syntax is simple ag pattern location so to search for class notation in php files in a given folder ag '\$this->' ~/code/php -G php. the -G flag is pattern matching for file name and/or extension. the -c flag will display the file location and count of matches, i o  /1-K /1-mG xerostyle_youtubexero style youtubemy personal vlog

    xero style brutal logo i s  11-MG xero_style_youtua 11-gm xero_style_youtubexero style youtubemy personal vlog

    i started my youtube channel in 2006. my 1st uploads are vintage metroid commercials, some lsdj music, circuit bending and some random code art.

    but on dec 5th 2020, i uploaded my first vlog and i just kept uploading. talking about stuff i like and was working on. eventually, i made a pocket dump video. talking about my EDC, or every day carry. pouches, patches, knives, flashlights, and other "pocket trash". and i found my voice and community... https://youtube.com/xerostyle

    xero style brutal logo i started my youtube channel in 2006. my 1st uploads are vintage metroid commercials, some lsdj music, circuit bending and some random code art.

    but on dec 5th 2020, i uploaded my first vlog. i talked about my struggles with whipple's dieases and my recovery process. so many people had asked about my sickness, that i made the vid to just send to people and not have to say it all over again.

    but we were in the midst of lockdowns, and i missed just chatting with people. so i just kept uploading. talking about stuff i like and was working on. eventually, i made a pocket dump video. talking about my EDC, or every day carry. pouches, patches, knives, flashlights, and other "pocket trash". and i found my voice and community.

    as of writing i have over 150 vlogs, 2700+ subscribers, and counting! i try to post a new vid weekly. come check it out at youtube.com/xerostyle or https://xero.style


    fn+ : 8pbTE6'whYA2# j [ L = .  w h P 8?category42.001>category43.001 =tag53 <tag47 ;tag43 :tag38 9tag15 8tag44 7tag31 6tag39 5tag28 4tag233category42.0082category42.007 1tag54 0tag49 /tag40 .tag23-category45.005 ,tag9 +tag13 *tag11 )tag57(category45 'tag60 &tag9%category45.005 $tag58 #tag38 "tag13 !tag59 category44.002 tag59 tag58 tag26category46.002category45.004 tag22 tag28 tag5 tag56 tag35 tag55category45.004 tag56 tag35 tag55 tag9 tag3 tag20 !tag57 .tag57 0tag57 4tag57 8tag57category45category46.002 tag57s of materials, regular and interactive. with this new release, you just have materials with a boolean interactive property.

    with this simple demo, im trying to learn more about the new interactive scene events. first, you create a 3D scene, and set it's interactive flag to true:

    view = new Viewport3D(width, height, scaleToStage, interactive);

    then create a material and set it's interactive property to true:

    papervision3D - face level interaction

    the new pv3d 2.0 release features an entirely new way of dispatching and handling events. earlier versions of the engine utilized two different flavors of materials, regular and interactive. with this new release, you just have materials with a boolean interactive property.

    with this simple demo, im trying to learn more about the new interactive scene events. first, you create a 3D scene, and set it's interactive flag to true:

    view = new Viewport3D(width, height, scaleToStage, interactive);

    then create a material and set it's interactive property to true:

    skin = new CompositeMaterial();
    skin.interactive = true;

    this can also be done through the object as opposed to the material:

    terrain = new Plane(...);
    terrain.material.interactive = true;

    after that you attach listeners to your object. in this case, we're going to use the interactiveScene3DEvent.

    terrian.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK, extrude);

    here's a list of the available interactive scene3d events:

    OBJECT_CLICK
    OBJECT_OVER
    OBJECT_OUT
    OBJECT_MOVE
    OBJECT_PRESS
    OBJECT_RELEASE
    OBJECT_RELEASE_OUTSIDE
    OBJECT_ADDED

    from these events its possible to receive a multitude of information. the 4 main ones are the instance properties available to you, which are:displyObject3Dface3DrenderHitData, and sprite. in this demo i use face3D to return the current triangle3D that the user is interacting with. 

    when the user moves the mouse over the plane, a highlight function is fired. i look at the current face3D and the last face3D and change their materials. this gives the effect that the triangle you are hovering over is illuminated. 

    but the code gets a bit hacky in the extrude function. this gets fired when the user actually clicks the plane. i receive an event from the interactive scene manager and once again get the current face3D instance. beyond that, i look that the v0 property and increment (or decrement, depending on the user's on click settings) the current face's z amount. notice that the current face is not the only one affected. it's surrounding triangles also rise up and form pyramids on their own. this is a sign is a well programmed engine! 

    as usual, sources are available...
    view the interactive terrain generator
    view its source code here

    G= .,, ',' ,,,,,,,,,,, ,,,,,,,,,,,' ,,,,,,,, _ __ _ _ 7CC=, '|CC$ ,$CCCCCCCCC%.%CCCCCCCCCCC7|' ,(CCCCCCCCCC|, | '_ \| | | | 77=77|. ,77==3 ,3=========$.$===========777.*C7==========7J' | | | | | | | C7===77* '(C====$.,3===777777%.$===7777777===J!J====777777====C _| | | | |_| | C7====77|. *77=====$.,3===$77777C $===3C7777$===J(3===C37777$====C(_)_| |_|\__,_| ', C7======77!=C=======3.,3===%****** $===3|****$===J7$===CC****3====C *77======777======77|.,3===$!!!!!! $===3(!!!!$===J!J===C7,,,,J====C ,*(C7============7(!*.,3===JCCCCC3.$===CCCCCCJ==7J'J===C(.' C====C ,**!7C=========77|***.,3=========$.$============J* J===C( . C====C .,*|77=========77(*,' ,3=========$.$============7= J===C( C====C '(C=============7=, ,3===3CCCCC3 $===JJCCCC3===J!J===C( C====C ' ,=7=======J7========! ,3===%****** $===3|****$===J!J===C( C====C 77======77!=77======3 ,3===%|||||| $===3!,,,,$===J!J===C7****J====C C7====7C(***|77=====3 ,3===C77777$.$===3' 3===J!J===7C7777C====C C7===7=!******(77===$.,3=========$.$===3' 3===J!7C============J( , C777C|***,.'***!7777$.,$777777777%.%777$' 3777J!*7J7777777777J7' (77=***,' .,***(777.'C777777777J C777C' 7777C,,*!=77777777=**' ,*****'. '******..*********** *****. ,****..************** ,***,. .,****..*********** *****. ,****. .',********,'. : . .... .... ........... ..... .... ........ . P R E S S S T A R T B U T T O N . ' . ,. . , ' .' ' ' .' .**. ., ,' .**. . . . . . ,!**.. . . . . . . .', . . .!,.. . . . . . ,!**.. **,*,*,***,**,,*,*****,*,**,*,,*,**,*,,*,**,*,**,**,*,*****,*,*,***,*,*,***,**,,*,*****,*,**, !***!*!!!***!**!!***!**!!***!**!!***!**!!******!!!*****!!!***!*!!!***!*!!!***!**!!***!**!!*** !!!!**!!*!!!**!!*!!!**!!*!!!***!*!*!***!*!*!***!*!!!***!!!!!***!!!!!!**!!*!!!**!!*!!!**!!*!!! |!!!!!!|||!!!!!|||!!!|!|||!!!|!|||!!!|!|||!!!|!|||!!!|!!||!!!!!!||!!!!!!|||!!!!!|||!!!|!|||!! (|(|(!||||(|(|||||(|(|||||((((!|||(|((!|||||((!|!||||(!|!(|||=!|!(|(|(!||||(((|||||(|(|||||(| =(((=!((=(((=|(((=((=||((=((=||(|7((=||((7((((|((=((((!((=((((!((=(((=!((=(((=|(((=((=||((=(( |=|7(=!(|=(=(=|(!=(===|(!=((==|=!==(==|(!(=(=((||(=|7((||(=|7((!(|=|7(=!(|=(=(=|(!=(===|(!=(( ===7|=||===C|=||(==C|=|(|==J|=!=|==J|(|(|==C((|(!==7=|((!==7=|=(!===7|=||===C|=||(==C|=|(|==J 7|C((C|!=|7(|J|!=(7=|3(|((==!J||((=7!J(||=(7|C=||=(C|77|!=|C|=C|!7|C((C|!=|7(|J|!=(7=|J||((== =7|||(||=7(||(||(=(||(||(==|!(|||==|!(|||=7||(|||=7||(|||=7||||!|=7|||(||=7(||(||(=(||(||(==| 377C$=|C3C7C$7|7JC7C37|=JJ7C3C|(JJ7CJJ|(JJ7CJ3(|J377J3(|C377C$(|C377C$=|C3C7C$7|7JC7C37|=JJ7C (7=||==!(7=(|=7!(7=(|(7!(77(||C!(=7(||C!|=7(||C||=7(||7||=7(||7(!(7=||==!(7=(|=7!(7=(|(7!(77( (=7!(=7|(=7|((7||=7|((=(!=7|((==*=7(|(==*=7(|(=7!===|(=7!===!(=7!(=7!(=7|(=7|((7||=7|((=(!=7| 377C$=|C3C7C$7|7JC7C37|=JJ7C3C|(JJ7CJJ|(JJ7CJ3(|J377J3(|C377C$(|C377C$=|C3C7C$7|7JC7C37|=JJ7C (7=||==!(7=(|=7!(7=(|(7!(77(||C!(=7(||C!|=7(||C||=7(||7||=7(||7(!(7=||==!(7=(|=7!(7=(|(7!(77( 9( tiny dab of solder from your iron to connect them. after all your wires are attached, wrap each of them individually, then wrap the entire bundle of wires.

    gameboy keyboard cable complete

    using the keyboard
    step one is actually syncing the keyboard to LSDj. insert the link cable you hacked onto the keyboard into the gameboy and load LSDj. press SELECT+UP and go to the PROJECT screen. move the cursor down to the SYNC dialog, and press A+RIGHT until you selection is KEYBD. notice just to the right of PURGE SEQUENCER an integer prefixed by an "I" appears. if nothing is synced to LSDJ/the gameboy this will display I00. once a device is successfully synced, this will be a larger integer (e.g. I01, I02). my keyboard oddly enought syncs as I06. 

    LSDj project screen

    making some noise
    to get some sounds to play when pressing keys on the keyboard, the sequencer must already be running. (press START) the notes you play will be played back on the next step in the phrase sequencer. if you need to get faster response timings, use a faster groove for the phrase you are playing.

    LSDj phrase screen

    an important feature of LSDj, that is easily overlooked, is when the sequencer is running the notes and instruments playing for each channel are displayed on the top right of the SONG screen. this can help a lot when you’re playing around and press the octave or instrument buttons up and down a bunch of times looking for something, and you get lost in the menus. this brings me to the one negative about the LSDj keyboard interface. every once in a while the instrument your playing will jump up or down like ten positions. i think the problem is related to pressing multiple keys too rapidly. i am not the only person to report this problem. technically the gameboy's z80i sound chip is playing each channel one note at a time in such a rapid succession it "tricks" the ear into thinking it's hearing them simultaneously. that's just how gameboy music works. and i think smashing keys on the keyboard can sometimes send multiple input messages per cycle in LSDj and glitches it, but that diagnosis is purely conjecture. and that random issue happens so rarely it's not a big deal. the interface is not perfect, but it's an easy mod, hacky, fun, and adds a new twist to LSDj.

    LSDj keyboard key chart

    key mapping
    SPACE play using custom table
    F1/F2 octave down/up
    F3/F4 instrument down/up
    F5/F6 select custom table to assign to SPACE
    F8 change pulse instrument playback channels (PU1, PU2, PU1+2)
    F9-F12 toggle channel mute (switches on key press)
    CTRL + (F9-F12) tap channel mute (switches on key press and release)

    demo video

    KU4@t starts with a period or full stop character is considered hidden, and in a default view will not be displayed. thus the name dotfiles.

    it's been said of every console user:

    you are your dotfiles

    ok, i said that ;P

    since they dictate how your system will look and function.

    i manage mine with gnu stow, a free, portable, lightweight symlink farm manager. this allows me to keep a versioned directory of all my config files that are virtually linked into place via a single command....

    preview of xero's shell

    table of contents

    in the unix world programs are commonly configured in two different ways, via shell arguments or text based configuration files. programs with many options like text editors are configured on a per-user basis with files in your home directory ~. in unix like operating systems any file or directory name that starts with a period or full stop character is considered hidden, and in a default view will not be displayed. thus the name dotfiles.

    it's been said of every console user:

    you are your dotfiles

    ok, i said that ;P

    since they dictate how your system will look and function. to many users (see ricers and beaners) these files are very important, and need to be backed up and shared. people who create custom themes have the added challenge of managing multiple versions of them. i have tried many organization techniques. and just take my word for it when i say, keeping a git repo in the root of your home directory is a bad idea. i've written custom shell scripts for moving or symlinking files into place. there are even a few dotfile managers, but they all seem to have lots of dependencies. i knew there had to be a simple tool to help me.

    managing

    i manage mine with gnu stow, a free, portable, lightweight symlink farm manager. this allows me to keep a versioned directory of all my config files that are virtually linked into place via a single command. this makes sharing these files among many users (root) and computers super simple. and does not clutter your home directory with version control files.

    installing

    stow is available for all linux and most other unix like distributions via your package manager.

    apt install stow
    brew install stow
    dnf install stow
    pacman -S stow
    yum install stow
    

    or clone it from source and build it yourself.

    how it works

    by default the stow command will create symlinks for files in the parent directory of where you execute the command. since i keep my dots in: ~/.local/src/dotfiles and all stow commands should be executed in that directory and suffixed with -t ~ to target the home directory. otherwise they will end up in ~/.local/. if you wanna make things easier on yourself you can clone the repo to ~/dotfiles then run commands with no flags. but who likes things easy in the unix world ;P

    to install configs execute the stow command with the folder name as the first argument, then target your home directory (or wherever you like).

    to install my zsh configs use the command:

    stow zsh -t ~

    this will symlink files like .zshrc to ~/.config/zsh

    to install the fun scripts to /usr/local/bin execute the command:

    stow fun -t /usr/local/

    this will symlink the fun scripts like food to /usr/local/bin.

    notice that the location of the scripts has appended a bin folder? that's b/c stow creates or uses the exact folder structure of the repo. and the food script is located at /fun/bin/food in this repo.

    note: stow can only create a symlink if a config file does not already exist. if a default file was created upon program installation you must delete it first before you can install a new one with stow. this does not apply to directories, only files.

    more notes on using/understanding stow in this github issue.

    my dotfiles setup

    to fully "install" and setup my dotfiles repo run the setup script or something like this:

    git clone git@github.com:xero/dotfiles.git ~/.local/src/dotfiles &&
    	cd ~/.local/src/dotfiles &&
    	stow bin fun git gpg ssh tmux neovim zsh -t ~
    
    # tmux
    mkdir ~/.config/tmux/plugins &&
    	git clone --depth=1 https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm &&
    	~/.config/tmux/plugins/tpm/scripts/install_plugins.sh &&
    	cd ~/.config/tmux/plugins/tmux-thumbs &&
    		expect -c "spawn ./tmux-thumbs-install.sh; send \"\r2\r\"; expect complete" 1>/dev/null
    
    # nvim
    mkdir ~/.local/nvim &&
      git clone --filter=blob:none --single-branch https://github.com/folke/lazy.nvim.git ~/.local/share/nvim/lazy
    nvim --headless "+Lazy! sync" +qa
    nvim --headless "+MasonUpdate" +qa
    
    # creating ~src and ~dotfiles aliases"
    sudo useradd -g src -d ~/.local/src src
    sudo useradd -d ~/.local/src/dotfiles dotfiles
    

    tl;dr

    navigate to your home directory

    cd ~

    clone the repo:

    git clone git@github.com:xero/dotfiles.git

    enter the dotfiles directory

    cd dotfiles

    install the zsh settings

    stow zsh

    install zsh settings for the root user

    sudo stow zsh -t /root

    uninstall zsh

    stow -D zsh

    etc, etc, etc...

    terminal emulator

    recently i've been using an 11" m1 ipad pro and a bluetooth 68% mechanical keyboard, usually on my lap, as my main computer. i use the community edition of the blink shell connected to a vps.

    when it comes to fonts i've been using hack (i use a mod w/ extra icons for extended unicode and emoji support.) it's included in base64 encoded css form, along with color schemes, in the blink directory.

    run blink config under appearance, set the screen mode set to cover then setup your server identity and keys. beyond that the only command i ever run in blink is mosh x. x being my server alias.

    vps & local clipboard

    idk why, but i chose debian 11 on aws for some r> duster and some glass cleaner on a paper towel. clean out all the little dirty recesses between and in the keys. if your keyboard is old like mine was, this step can take a while ;D

    soft circuits

    some of the soft plastic circuits can get a little dirty or folded, clean them as well and make sure they will align correctly when you put everything back. if you have never taken apart a keyboard before, it's very interesting...

    wire labeling

    now take a look at the daughter board from the keyboard. if you’re lucky, like i was, each of the wires leading to the cables from the board will be labeled. if they are not labeled, you’re going to have to cut the end of the mini-din connector off and look at what color wire attaches to which pin number.

    painting

    step six is painting they keyboard. this step is optional. i used regular spray paint on the exterior plastic casings. i painted it all one coat of green, then splattered it slightly with a darker green. for the keys i wanted to make sure they had a less tacky feel, so i painted them with paint-markers. you can get them at an art/craft store or at some office supply stores, i like the "painters" brand. i painted the piano keys white and black and the LSDj interface keys i painted green.

    prep for soldering

    step seven is prepping your tools for soldering. clean your soldering iron with some steel wool and set it to medium/low heat. you'll need flux, wire strippers, and something to wrap your wiring with. you can use heat-shrink tubing, electrical, or duct-tape. step eight is cutting the wires from both your gameboy link cable and the keyboard. then peel apart each of the wires and strip about 1/8" off each wire. use an x-acto knife to peel back the cable shielding.

    LSDj keyboard wiring diagram

    step nine is reviewing the wiring diagram. click here to download it. you will be connecting data, clock, power, and ground wires from both the keyboard and the gameboy link cable.

    LSDj wires spliced and wrapped

    step ten is soldering the wires. wrap the wires from each cable together and dip them in flux. then add aAtp://www.nonelectronics.com/catalog/index.php?main_page=product_info&cPath=8&products_id=10&zenid=1829a677d9d350c5bc6e8d5eae5846d3" target="_blank">powered link cables and 4 player adapters at his shop nonelectronics.com.

    classic HP keyboard

    the first thing you need is an old keyboard. for this mod you need a mini-din, aka a ps2 (not playstation 2), keyboard. i used an old hp ibm keyboard i pulled out of a dumpster at work. step one is testing it. plug it into a computer, open a text editor, and press all the keys. try tapping them very fast and see how often they actually fire. the responsiveness of the keys in this setting will be relative to their sensitivity in LSDJ.

    pop off the keys

    step two is popping off all the keys. use a flat head screw driver and stick it in the ridge beside the key then push the screw driver up like a lever. the key should just pop right off. repeat this process for all the normal keys. when you get to the spacebar and some of the other odd shaped keys, like enter, you might find springs or metal wires pressing two points on the keyboard. try and take note of their positioning, because you will need to put them back that way.

    piles of keys

    now you should have a piles of keys and a bare keyboard. throw all the keys in a bag, so you don't lose any, and flip the keyboard over. step three is unscrewing the keyboard, prying open and removing it's plastic covering.

    unscrew the daughter board

    carefully keep taking the keyboard apart. every model is slightly different, so pay attention so you can reassemble it. eventually you will see a small silicon daughter board with the cable attached. step four is removing the daughter board. unscrew the board from the innards of the keyboard and set it somewhere safe, like in an anti-static bag.

    a keyboard in pieces

    now that you have all the plastic removed, separate all the different parts and note how they were oriented in the casing.

    clean everything out

    step five is cleaning everything up. i just used air most, i wore a wedding ring. mine was made of black hematite. but typing for a living made it so uncomfortable to wear i had to stop. even though nina assured me it was fine, i always felt bad not publicly displaying our love and commitment to one another. so i struck out on a quest to find a symbol i felt represented it.

    unicursal hexagram wedding tattoo

    i've always wanted knuckle tattoos. in my youth i thought of being like OZZY and getting XERO. i considered CODE/HACK as a modern day spoof on the ago old classic GOOD/EVIL. but more than anything, i struggled over typography.

    when i first got married, like most, i wore a wedding ring. mine was made of black hematite. but typing for a living made it so uncomfortable to wear i had to stop. even though nina assured me it was fine, i always felt bad not publicly displaying our love and commitment to one another. so i struck out on a quest to find a symbol i felt represented it.

    the unicursal hexagram is a six-pointed star that can be traced or drawn unicursally, in one continuous line rather than by two overlaid triangles. in projective geometry, pascal's theorem (aka hexagrammum mysticum, latin for mystical hexagram) states that if six arbitrary points are chosen on a conic (which may be an ellipse, parabola or hyperbola in an appropriate affine plane) and joined by line segments in any order to form a hexagon, then the three pairs of opposite sides of the hexagon (extended if necessary) meet at three points which lie on a straight line, called the pascal line of the hexagon, named after blaise pascal. the theorem is also valid in the euclidean plane, but the statement needs to be adjusted to deal with the special cases when opposite sides are parallel. [more]

    wikipedia
    unicursal hexagram tutorial

    in mathematical knot theory, 74 is the name of a 7-crossing knot which can be visually depicted in a highly-symmetric form. the simplest interlaced version of the buddhist endless knot symbol is topologically equivalent to the interlaced version of the unicursal hexagram of occultism. however, the endless knot symbol has more complex forms not equivalent to 74, and both the endless knot and unicursal hexagram can appear in non-interlaced versions, in which case they are not knots at all.

    endless knot examples

    the 74 knot is a lissajous knot, representable by the parametric equation:

    x = cos(2t + 0.22)
    y = cos(3t + 1.1)
    z = cos(7t)
    

    sacred geometry texts describe the perfectly symmetrical, mirrored interlocking triangles as symbols of the union of masculine and feminine, earth and sky, joined together harmony. an infinite recursive star, the perfect mathematical representation of our love.

    so when my buddy josh "pimp hand" hayward was back in town, i sat down in the chair w/ him at jester's court tattoo in the southside to make it permanent.

    f-ften pipe this into word count by line to get a count of the matching files ag -c something ~/some/where | wc -l.

    ag has it's own plugin adding the Ag command to vim. it's results are displayed in a quickfix window. set let g:ag_highlight=1 your search results will be highlighted in the buffers as you open them. thoughtbot gave me the idea of mapping backslash \ to ag with nnoremap \ :Ag<SPACE>. so / searches the current buffer and \ searches another location.

    random vim tips

    fix indentation

    gg=G

    in normal mode, typing gg=G will reindent the entire file. this is a special case where = is an operator. just like d or y, it will act on any text that you move over with a cursor motion command. in this case, gg positions the cursor on the first line, then =G re-indents from the current cursor position to the end of the buffer.

    remove trailing white space

    remove all trailing white space (replace with nothing)

    :%s/\s\+$//

    remove blank lines

    remove duplicate blank lines

    :g/^\s*$/d

    spellcheck

    toggle the spell checker

    :setlocal spell! spell?

    learning & tutorials

    musings from my vim guru z3bra

    interactive:

    videos:

    books:

    wrap up

    no editor or IDE will make you a better programmer. no plugins, linters, or refactoring tools will make you write better code. they're all just tools to assit your brain. learning vim's motions and modal editing style might increase your overall coding speed, or it might be too complex and just annoy you.

    inb4...

    something something evil mode

    emacs users

    your toolchain is a very personal thing, and you should use what works best for you. everything in this article is my opinion, and should be taken as such. others might agree or fervently dissagree with me. and that's fine. i just wanted to get my feelings out there about, what i consider, to be the best editor for programming.

    V4<