Skip to content

Instantly share code, notes, and snippets.

View myfreax's full-sized avatar

myfreax myfreax

View GitHub Profile
@myfreax
myfreax / 0_reuse_code.js
Created November 24, 2015 08:34
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@myfreax
myfreax / How to install tcpping on Linux.md
Last active June 27, 2022 10:00 — forked from cnDelbert/How to install tcpping on Linux.md
How to install tcpping on Linux

To install tcptraceroute on Debian/Ubuntu:

$ wget http://linuxco.de/tcping/tcping-1.3.5.deb
$ sudo dpkg -i tcping-1.3.5.deb

To install tcptraceroute on CentOS/REHL, first set up RepoForge on your system, and then:

@myfreax
myfreax / gist:5a3deed2092fafcc8bae44498ae07c72
Created August 15, 2017 04:21 — forked from hayderimran7/gist:9246dd195f785cf4783d
How to solve "sudo: no tty present and no askpass program specified" when trying to run a shell from Jenkins
Running shell scripts that have contain sudo commands in them from jenkins might not run as expected. To fix this, follow along
Simple steps:
1. On ubuntu based systems, run " $ sudo visudo "
2. this will open /etc/sudoers file.
3. If your jenkins user is already in that file, then modify to look like this:
jenkins ALL=(ALL) NOPASSWD: ALL
4. save the file by doing Ctrl+O (dont save in tmp file. save in /etc/sudoers, confirm overwrite)
5. Exit by doing Ctrl+X
6. Relaunch your jenkins job
@myfreax
myfreax / curl.md
Created December 27, 2017 08:22 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@myfreax
myfreax / introrx.md
Created August 25, 2018 07:43 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@myfreax
myfreax / flatten-array.js
Created September 4, 2018 07:40 — forked from Integralist/flatten-array.js
Array flatten function written in ES6 syntax
const flattenTco = ([first, ...rest], accumulator) =>
(first === undefined)
? accumulator
: (Array.isArray(first))
? flattenTco([...first, ...rest])
: flattenTco(rest, accumulator.concat(first))
const flatten = (n) => flattenTco(n, []);
console.log(flatten([[1,[2,[[3]]]],4,[5,[[[6]]]]]))
@myfreax
myfreax / GitConfigHttpProxy.md
Created May 8, 2021 03:02 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@myfreax
myfreax / dev.yml
Created June 5, 2021 03:16 — forked from maxkostinevich/dev.yml
Github Actions - Deploy Serverless Framework (AWS)
#
# Github Actions for Serverless Framework
#
# Create AWS_KEY and AWS_SECRET secrets in Github repository settings
# If you're using env.yml file, store its content as ENV Github secret
#
# Master branch will be deployed as DEV and every new tag starting with "v**" (e.g. v1.0, v1.2, v2.0, etc) will be deployed as PROD
#
# Learn more: https://maxkostinevich.com/blog/how-to-deploy-serverless-applications-using-github-actions/
#
@myfreax
myfreax / OculusQuestCloudGaming.md
Created July 7, 2021 06:24 — forked from lionello/OculusQuestCloudGaming.md
Playing SteamVR games on the Oculus Quest

Playing SteamVR games on the Oculus Quest, without owning a PC

Setting up your Virtual Machine

We'll be creating a new Virtual Machine on Microsoft's cloud platform, Azure. The VM will have a beefy GPU just like a home computer so it can be used for playing games.

  1. Go to [the Azure portal][azure] and sign up or log in.
  2. If you are on a Free account, first go to Subscriptions and upgrade it to a Pay-as-you-go plan. Don't worry, you will get to keep any free credits you have. Azure's interface is a bit slow so this will take a minute.

⚠️ Make sure to not include any support plan because they will charge you monthly!

@myfreax
myfreax / cordova-plugin-guide.md
Created August 23, 2021 06:15 — forked from bsorrentino/cordova-plugin-guide.md
Cordova Plugin Developer Guide

Cordova Plugin Development Guide for Android

Cordova Plugins are the magic that enable our mobile web app content to access the full power of Native SDKs underneath, but through clean JavaScript APIs that work the same across all platforms we target.

This simple guide, walks through the what, when, why, and how of Cordova plugin development for Android.

Introduction

Before start, understand their