Skip to content

Instantly share code, notes, and snippets.

Carlos Rosquillas disusered

Block or report user

Report or block disusered

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View config_loader.ex
defmodule Sphingi.ConfigLoader do
defp parse(value) when is_atom(value), do: value |> to_string
defp parse(value), do: value
def get(namespace, value, key \\ nil) do
if key do
parse(Application.get_env(namespace, value)[key])
else
parse(Application.get_env(namespace, value))
View request.sh
## Batch Create Assertion Duplicate
curl -X "POST" "http://localhost:4000/api/batch/assertions" \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Cookie: jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjYXJsb3NAYmFkZ2V0cmVlLmNvbSIsImlkIjoyfQ.yL0nNX_l3VtPjgZdVk7-1Q7TD4XF_IiVk2VgwhwoOqs; ueberauth_linkedin_state=INKFNIWeDa6TbzGP9aI/VA==' \
-d $'{
"data": [
{
"issuer_id": "4",
"user_email": "diego@edvolution.io",
"message": "Mensaje",
View error.json
{
"errors": [
{
"reason": "invalidQuery",
"location": "query",
"message": "Syntax error: Unexpected \"-\" at [1:25]"
}
],
"response": {
"kind": "bigquery#job",
View keybase.md

Keybase proof

I hereby claim:

  • I am disusered on github.
  • I am disusered (https://keybase.io/disusered) on keybase.
  • I have a public key ASDpgD3vf6Ewt-zpBJ8oKvO-lYCM5Jci60gSmO_bZnY6kAo

To claim this, I am signing this object:

@disusered
disusered / profiler
Created Jul 13, 2015
Profiling Neovim startup
View profiler
#!/bin/bash
iterations=10
# -----------------------------------------------------------------------------
# Create array of results
declare -a results
for i in $(seq 1 $iterations);
@disusered
disusered / dnsimple
Created Nov 11, 2013
Update DNSimple with local IP
View dnsimple
#!/bin/bash
# JSON Parser
JSON=`curl -s -X GET http://jsonip.com/`
PROP='ip'
function jsonval {
temp=`echo $JSON | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $PROP`
echo ${temp##*|}
}
@disusered
disusered / .slate
Last active Dec 23, 2015
Slate configuration
View .slate
# ---------------------------------
# Config
# ---------------------------------
config defaultToCurrentScreen true
config checkDefaultsOnLoad true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Shows app icons and background apps, spreads icons in the same place.
config windowHintsIgnoreHiddenWindows false
@disusered
disusered / Gemfile
Created Sep 27, 2011
LiveReload, Compass, Sprockets & JSMin with Guard
View Gemfile
source "http://rubygems.org"
# Rake
gem 'rake'
gem 'guard-shell'
# Sprockets
gem 'sprockets','~> 1.0.2'
# JSMin
@disusered
disusered / lindns.sh
Created May 2, 2011
Linode Dynamic DNS
View lindns.sh
# update our entry with our ip
wget -qO- https://api.linode.com/?api_key=KEY\&api_action=domain.resource.update\&domainid=DOMAINID\&resourceid=RESOURCEID\&Target="[remote_addr]"
#
# in case you don't have your Domain ID on hand, you would need to run the following command first:
# wget -qO- https://api.linode.com/?api_key=APIKEY\&api_action=domain.list | tr ',' '\n'```
#
# afterwards, we can get the ResourceID via:
# wget -qO- https://api.linode.com/?api_key=APIKEY\&api_action=domain.resource.list\&domainid=DOMAINID| tr ',' '\n'```
#
You can’t perform that action at this time.