Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠
midlife crisis

felipe stival v0idpwn

🤠
midlife crisis
View GitHub Profile
@v0idpwn
v0idpwn / get_lang.cpp
Last active Oct 9, 2015
Get system language
View get_lang.cpp
#include <stdio.h>
#include <locale.h>
int main (){
int repeat=0;
do {
printf ("Locale is: %s\n", setlocale(LC_CTYPE,NULL) );
setlocale (LC_CTYPE,"");
} while (!repeat++);
return 0;
View primes.hs
-- primality test written in haskell
-- github.com/v0idpwn
multipliers = [y | k <- [1..], y <- [(6*k)-1, (6*k)+1]]
used n = [2,3] ++ takeWhile(< sqrt n) multipliers
check_div :: Int -> Int -> Bool
check_div k p
| mod k p == 0 = True
| otherwise = False
View image_tweeter.py
import tweepy
import sys
# Credentials
consumer_key = "foo"
consumer_secret = "foo"
access_token = "foo"
access_secret = "foo"
# Setting up OAuth
@v0idpwn
v0idpwn / prototype.cpp
Created Jun 21, 2019
rlab server class prototype
View prototype.cpp
class Response {
public:
unsigned int status = 1; // 0 for success, other values for error codes
string payload; // the data to be transmitted, could be empty
}
/**
* This class implements the logic server side
* Should be instantiated in arduino and call runCommand(sensor_input)
*/
View reproducing-attempt.patch
From f034e4a69845f47f5789f2b136b24626e17600a2 Mon Sep 17 00:00:00 2001
From: v0idpwn <v0idpwn@gmail.com>
Date: Mon, 2 Nov 2020 16:57:41 -0300
Subject: [PATCH] reproducing attempt
---
test/ecto/repo_test.exs | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/test/ecto/repo_test.exs b/test/ecto/repo_test.exs
View bench_any_vs_in.exs
Mix.install([
{:benchee, "~> 1.0"},
{:benchee_html, "~> 1.0", only: :dev}
])
minimal_size = 5
medium_size = 1000
big_size = 10_000
build_list = fn size ->