Skip to content

Instantly share code, notes, and snippets.

Avatar

renan jegouzo renanyoy

View GitHub Profile
@renanyoy
renanyoy / gist:ebe16d721597606d6c511b60a7411c01
Last active Dec 15, 2017
xcode, debug obj_msgSend crash
View gist:ebe16d721597606d6c511b60a7411c01
p (char *) object_getClassName(*(long*)($x0))
p (char *) $x1
p (char *) $x2
View install-geocouch.sh
#!/bin/sh -x
cd /tmp
if [ ! -d "geocouch" ]; then
git clone https://github.com/couchbase/geocouch.git
fi
cd geocouch
git checkout couchdb1.2.x
View relay.js
// relay.js
var util = require('util');
var net = require('net');
var dns = require('dns');
var nurl = require('url');
var host = '127.0.0.1';
var port = 6969;
var source = '';
@renanyoy
renanyoy / crayola.json
Created Feb 25, 2016 — forked from jjdelc/crayola.json
Crayola colors in JSON format
View crayola.json
[
{
"hex": "#EFDECD",
"name": "Almond",
"rgb": "(239, 222, 205)"
},
{
"hex": "#CD9575",
"name": "Antique Brass",
"rgb": "(205, 149, 117)"
@renanyoy
renanyoy / nodejs-tcp-example.js
Created Dec 30, 2015 — forked from tedmiston/nodejs-tcp-example.js
Node.js tcp client and server example
View nodejs-tcp-example.js
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@renanyoy
renanyoy / Synology-Diskstation-Git.md
Created Oct 11, 2015 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation
View Synology-Diskstation-Git.md

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@renanyoy
renanyoy / pixelate.js
Created Sep 3, 2015
javascript, pixel effect + black and white
View pixelate.js
// usage: <image src="cool-dog.png" onload="pixelate(this,16)"/>
(function() {
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
var anims = [];
function pulse() {
var a = anims.slice();
for (var i = 0; i < a.length; i++)
View KillX2Go.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Threading;
namespace KillX2Go
{
@renanyoy
renanyoy / png2jpeg.sh
Last active Aug 29, 2015
convert all png to jpeg
View png2jpeg.sh
function png2jpeg() {
echo 'Warning this command wil convert all png in jpeg recursively and delete png files'
echo "Do you wish to Continue?"
select yn in "Yes" "No"; do
case $yn in
Yes )
for f in `find . -name "*.png"`
do
alpha=$(identify -format %A $f)
if [ "$alpha" == 'False' ]
You can’t perform that action at this time.