Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Decentralize and democratize the Web.

Jacky Alciné jalcine

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

#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.

View dumbthing.c
#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");
View 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?

View foo.rb
# 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 Jun 20, 2020
Getting libuv and zeromq working together (polling setup)
@jalcine
jalcine / HTTP_API.markdown
Last active Aug 29, 2015
A bunch of ideas for using HTTP as a API platform.
View HTTP_API.markdown

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
View foo
(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
You can’t perform that action at this time.