Skip to content

Instantly share code, notes, and snippets.

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

Jacky Alciné jalcine

💭
Decentralize and democratize the Web.
View GitHub Profile
Verifying I am +jacky on my passcard. https://onename.com/jacky
function contractingRateInfo( options ) {
var
committed_days,
committed_days_cost,
committed_hours,
committed_hours_cost,
hourly,
weekly
;
effective. Power لُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗

#Ruby Interview Questions

What are blocks for?

Plain old english: Ways of grouping code we want to run. The simplest explanation for a block is that it is a chunk of code between {} or do...end, that can't be stored in a variable and isn't an object. A block is just part of the syntax of a method call. It doesn’t mean anything on a standalone basis and can only appear in argument lists.

What are the difference between p and puts?

The difference is subtle, but p prints the true value of an object, rather than a string-ified version of the object. This will make more sense soon, but for the sake of simplicity, we'll use the p command throughout the exercises, as we'll want to see the true values of our code returned to the output window.

#define _CRT_SECURE_NO_WARNINGS // turn off SAFE COMMANDS
// ############################
// Written By: Cristian Colocho
// Date Written: March, 14, 2015
// Purpose: Loop Menu and Switch
// ############################
#include <stdio.h>
#include <stdlib.h>
#define PAUSE system("pause");
@jalcine
jalcine / SECURITY.md
Last active August 29, 2015 14:16 — forked from Najaf/SECURITY.md

Security inspections

At the beginning of each month, we carry out a brief, high-level security inspection. The purpose is to be a sanity check for head-slapping, trivial vulnerabilities that no one expected would be in the code but somehow managed to creep in anyway.

Who's responsible?

One of @alice, @bob or @charlie should do the inspection if no one else has the time.

How often?

@jalcine
jalcine / foo.rb
Last active August 29, 2015 14:13
# Reverse letters in string.
def reverse_abstract(list)
max_distance = (list.length - 1 / 2)
for i in 0..max_distance do
left_index = i
right_index = list.length - i - 1
left_entry = list[left_index]
right_entry = list[right_index]
@jalcine
jalcine / .gitignore
Last active March 18, 2024 07:20
Getting libuv and zeromq working together (polling setup)
build
@jalcine
jalcine / HTTP_API.markdown
Last active August 29, 2015 14:13
A bunch of ideas for using HTTP as a API platform.

Leveraging HTTP as a Basis for Interacting with APIs

Unauthenticated Requests

Using [Last.fm's API][lastfm] as an example; let's wrap this call http://www.last.fm/api/show/user.getRecentTracks.

HTTP: http://www.last.fm/api/show/user.getRecentTracks
HTTP/API: lastfm://user/jackyalcine/currentTracks?size=5
@jalcine
jalcine / foo
Created January 11, 2015 20:00
(gdb) run
Starting program: /home/jalcine/Development/Scratch/a.out
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGABRT, Aborted.
0x00007ffff7828e37 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt