Skip to content

Instantly share code, notes, and snippets.

Miguel Espinoza purefan

Block or report user

Report or block purefan

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 gist:6dfdb478c51908ef6aefc1a1dd5349be
FAIL src/EngineChain/test.spec.js
● Test suite failed to run
Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
Here's what you can do:
@purefan
purefan / fif
Last active May 15, 2018
This is what I use to have a pretty "Search in files". In debian based distros you can add it to /usr/bin/fif and call it like this: fif whatever
View fif
#!/bin/bash
find . -not -iwholename '*.svn*' -type f -print | xargs egrep --color=auto --line-number --no-messages "$1"
@purefan
purefan / ws-client.cpp
Last active May 10, 2018
cpp ws client - not working
View ws-client.cpp
#include "stdafx.h"
#include <websocketpp/config/asio_no_tls_client.hpp>
#include <websocketpp/client.hpp>
#include <Windows.h>
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <future>
typedef websocketpp::client<websocketpp::config::asio_client> client;
@purefan
purefan / 2017-06-29.json
Last active Jun 29, 2017
Stylus styles
View 2017-06-29.json
This file has been truncated, but you can view the full file.
[
{
"sections": [
{
@purefan
purefan / generic-dark-theme.css
Created Mar 31, 2017
Generic dark theme for Stylish based on Krebs on security
View generic-dark-theme.css
body,
h1, h2, h3,
div > h2,
.post h2,
p,
ol.commentlist,
ol.commentlist li,
ol.commentlist li.even,
li.comment,
#commentform > p > label > small
View keybase.md

Keybase proof

I hereby claim:

  • I am purefan on github.
  • I am purefan (https://keybase.io/purefan) on keybase.
  • I have a public key whose fingerprint is D2CF D858 B1EC C85E C149 B7F6 8E99 4C00 AB86 566A

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am purefan on github.
  • I am purefan (https://keybase.io/purefan) on keybase.
  • I have a public key ASAGHxbvAk3qB4QbuvMRa98GZ1iMh2xdOvmuZnd7vG_54Qo

To claim this, I am signing this object:

@purefan
purefan / mypinger.sh
Created Jan 26, 2016
Simple ping wrapper
View mypinger.sh
#!/bin/bash
DOCURL=true;
echo $0
runCurl() {
PING=$(curl --connect-timeout 1 --max-time 1 --head -s ${1});
ISUP=false;
if [[ $PING == *"200 OK"* ]]; then
ISUP=true;
@purefan
purefan / app.class.php
Last active Jan 6, 2016
Basic library and sample html page showing how to create a basic app for PHPFox
View app.class.php
<?php
class FoxApp
{
private $_sFoxUrl = null;
private $_sAppId = null;
private $_sToken = null;
public function __construct($sFoxUrl = null, $sAppId = null)
{
@purefan
purefan / tree
Created Apr 27, 2013
Display folders in linux as tree. A script in bash provided by http://www.centerkey.com/tree/ No copyright infringement inteded, I couldn't find a license in the site. Pasted here just in case.
View tree
#!/bin/sh
#######################################################
# UNIX TREE #
# Version: 2.3 #
# File: ~/apps/tree/tree.sh #
# #
# Displays Structure of Directory Hierarchy #
# ------------------------------------------------- #
# This tiny script uses "ls", "grep", and "sed" #
# in a single command to show the nesting of #
You can’t perform that action at this time.