Skip to content

Instantly share code, notes, and snippets.

View jalcine's full-sized avatar
💭
Decentralize and democratize the Web.

jalciné jalcine

💭
Decentralize and democratize the Web.
View GitHub Profile
#include <uv.h>
#include <stdlib.h>
// Thanks learnuv.
#define CHECK(r, msg) if (r) { \
sprintf("%s: [%s(%d): %s]\n", msg, uv_err_name((r)), (int) r, uv_strerror((r))); \
exit(1); \
}
#include "learnuv.h"
#define BUF_SIZE 37
static const char *filename = __MAGIC_FILE__;
int main() {
int r = 0;
uv_loop_t *loop = uv_default_loop();
/* 1. Open file */
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@jalcine
jalcine / ThingsIWant.markdown
Last active December 1, 2017 22:02
Scratchpad

Things I Want

The following is a list of things I'd like to have or would like to do to make my life a tad bit easier. Under it, I've marked off my acknowledgment (not really the completion date of) said items.

  1. A compatible equivalent for Vagrant Manager for KDE/Linux.
  2. Better management for forwarding SSH keys between tmux. done
  3. Pull out publicly available files for KDE into a kderc repository. done
  4. Incorporate this into my dotfiles https://github.com/bchretien/Gdbinit
@jalcine
jalcine / pain_point.cpp
Created August 31, 2014 02:59
Pain Point in Wintermute
// Snatched from http://git.io/P3hFYw
PluginPrivate::~PluginPrivate()
{
if (libraryPtr->isLoaded())
{
wwarn("Unloading plugin " + name + "'s library...");
if (libraryPtr->unload())
{
wwarn("Unloaded library for plugin " + name + "!");
<?php
/** The '<?=' is the same as '<?php echo'. A shortcut. */
$record_text = __('Viewing {0} - {1} of {2}');
$invoices_url = url_for('account_billing/getInvoices') . '?year=';
$vat_entries = <<<VAT_INFO
{name:'invoice_amount', index:'invoice_amount', width:150, sortable:false, resizable:false, align:'right'},
{name:'vat_amount', index:'vat_amount', width:150, sortable:false, resizable:false, align:'right'},
VAT_INFO;

Architectural Questions

  • Are responsibilities well defined?
  • Are the collaborations well defined?
  • Is coupling minimized?
  • Can you identify potential duplication?
  • Are interface definitions and constraints acceptable?
  • Can modules access needed data—when needed?

Subway Info

##Preview

Screenshot 1: https://raw.github.com/parthibanloganathan/dashing_widgets/master/public/mta1.png Screenshot 2: https://raw.github.com/parthibanloganathan/dashing_widgets/master/public/mta2.png

Description

Subway Info is a Dashing widget which displays information on trains in New York City. Information includes train line, direction, station and arrival time. You can customize it to include any combination of lines and stations. This may also be used in other cities as well if you have the appropriate GTFS files.

@jalcine
jalcine / mother.js
Created May 4, 2014 03:31
Loading shit.
$('a[data-uri]').each(function(elem){
var $a = $(elem), theUrl = $a.attr('data-uri');
$('section#mother').load(theUrl);
});
@jalcine
jalcine / helper_commands.vim
Created April 30, 2014 18:33
Random commands for LYFE.
" Reformats JSON in current buffer nicely.
:%!python -m json.tool