Skip to content

Instantly share code, notes, and snippets.

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 08:26
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
#!/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 11:56
cpp ws client - not working
#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 June 29, 2017 09:56
Stylus styles
This file has been truncated, but you can view the full file.
[
{
"sections": [
{
@purefan
purefan / generic-dark-theme.css
Created March 31, 2017 10:27
Generic dark theme for Stylish based on Krebs on security
body,
h1, h2, h3,
div > h2,
.post h2,
p,
ol.commentlist,
ol.commentlist li,
ol.commentlist li.even,
li.comment,
#commentform > p > label > small
@purefan
purefan / keybase.md
Last active February 14, 2017 15:25

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:

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 January 26, 2016 09:48
Simple ping wrapper
#!/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 January 6, 2016 18:00
Basic library and sample html page showing how to create a basic app for PHPFox
<?php
class FoxApp
{
private $_sFoxUrl = null;
private $_sAppId = null;
private $_sToken = null;
public function __construct($sFoxUrl = null, $sAppId = null)
{
@purefan
purefan / tree
Created April 27, 2013 15:29
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.
#!/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 #