Tag Archives: UNIX

How to Build A Slackbot + Deploy an App to Heroku for Absolute Beginners

via The npm Blog — How to Build A Slackbot + Deploy an App to Heroku….

Back in ye olde days of the internet, there was IRC (Internet Relay Chat), a chat network with channels and servers for every microcosm in the world. Folks would make these little bots or services — they’d greet you when you joined a channel, played trivia, Uno and other chat-based games with you. Unfortunately, if you wanted to make one yourself, you likely needed some knowledge of Perl, client-server architecture and a handful of Unix commands.

Today, most will opt for a more aesthetic alternative to IRC. Namely, Slack — a chat-based team communication tool. The best part? You can create a Slackbot with substantially fewer roadblocks.

I’ll try not to make assumptions on the technologies you may or may not have on your machine here. So let’s go ahead and start from scratch. If you already have any or all of following downloaded, you’re ahead of the game!

Calling Oracle SQL in UNIX

here is sample code to: call oracle sql statements in UNIX and use UNIX variable in SQL statement. See the variable ‘”$FILE”‘ #Sample code for FILE in `ls` do echo $FILE TEMP=`echo ” set heading off; set TERMOUT off; set echo off; Insert Into FILES_IN_DIRECTORY_TABLE Values(SEQUENCE_S.NEXTVAL, ‘”$FILE”‘, ‘IN_PROCESS’, NULL, SYSDATE, ‘49238’, SYSDATE, ‘49238’, ‘49238’); COMMIT; […]


Get Operating System Name (Linux / UNIX / Windows) Using PowerShell

As I manage Oracle and SQL Server databases on both Linux and Windows, I sometimes need to determine the OS type before I work with the host so that I can do things conditionally in PowerShell. I looked around the Web and could not find a good example of how to get this information except […]


knet 1.4.x: Cross-Platform, light-weight, multi-threading TCP library written in c/c++

via dennis-kk/knet · GitHub.

knet is cross-platform multi-threading light-weight TCP transport library, for now, knet support IOCP,select, epoll model on Windows and CentOS. it will testing under more Linux and Unix OS version, more model will be implemented like: kqueue(kevent) etc.
knet is not a event loop like libevent, knet focus on transport only.

Java REST JAX-RS 2.0 – How To Handle Date, Time and Timestamp Data Types

via Java REST JAX-RS 2.0 – How To Handle Date, Time and Timestamp Data Types — Developers’ ScrapPad.

Be it X-Form-Urlencoded or JSON HTTP post to a REST resource end-point, there is no specific “data type” for date or time related data. Most developers will have these data posted as “String” or just simply convert them to Unix timestamp value (e.g. 1435061152). But, as developers implement more and more end-point methods, codes to parse of date, time and timestamp string representation values to actual java.sql.Date or java.util.Date will be repetitive (and boring). So, the intention of this article is to show how to implement a custom data type for handling date and time related string values in JAX-RS 2.0 REST end-point method parameters.

A delightful, performance-focused Redis client for Node and io.js

via luin/ioredis · GitHub.

ioredis is a robust, full-featured Redis client used in the world’s biggest online commerce companyAlibaba.

  1. Full-featured. It supports Cluster(WIP), Sentinel, Pipelining and of course Lua scripting &Pub/Sub(with the support of binary messages).
  2. High performance.
  3. Delightful API. Supports both Node-style callbacks and promises.
  4. Supports command arguments and replies transform.
  5. Abstraction for Lua scripting, allowing you to define custom commands.
  6. Support for binary data.
  7. Support for both TCP/IP and UNIX domain sockets.
  8. Supports offline queue and ready checking.
  9. Supports ES6 types such as Map and Set.
  10. Sophisticated error handling strategy.

Straightening our Backbone: A lesson in event-driven UI development

via Straightening our Backbone: A lesson in event-driven UI development | Mixpanel Engineering.

Mixpanel’s web UI is built out of small pieces. Our Unix-inspired development philosophy favors the integration of lightweight, independent apps and components instead of the monolithic mega-app approach still common in web development. Explicit rather than implicit, direct rather than abstract, simple rather than magical: with these in-house programming ideals, it’s little surprise that we continue to build Single-Page Applications (SPAs) with Backbone.js, the no-nonsense progenitor of many heavier, more opinionated frameworks of recent years.

On an architectural level, the choice to use Backbone encourages classic Model-View designs in which control flow and communication between UI components is channeled through events, without the more opaque declarative abstraction layers of frameworks such as Angular. Backbone’s greatest strengths, however – its simplicity and flexibility – are a double-edged sword: without dictating One True Way to architect an application, the library leaves developers to find their own path. Common patterns and best practices, such as wiring up Views to listen for change events on their Models and re-render themselves, remain closer to suggestions than standard practices, and Backbone apps can descend into anarchy when they grow in scope without careful design decisions.