Skip to content

Instantly share code, notes, and snippets.

View hfalucas's full-sized avatar

Helder Lucas hfalucas

View GitHub Profile
@ricardoaguiar
ricardoaguiar / Install and uninstall dnsmasq.md
Created April 15, 2020 16:43
Install and uninstall dnsmasq #Dnsmasq #TipsTricks

Install

  1. brew install dnsmasq
  2. cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf now this is automatically done by the dnsmasq installation
  3. Replace this in /usr/local/etc/dnsmasq.conf file:
address=/test/127.0.0.1
listen-address=127.0.0.1
  1. sudo mkdir -v /etc/resolver
  2. sudo touch /etc/resolver/test
@Pezhvak
Pezhvak / supervisor-mac-installation.md
Last active November 15, 2023 13:35
Supervisor Mac Installation (Laravel)

alright, everybody writen one about this but nothing worked for me, here's how it works without any problem:

first run brew install supervisor

run brew services start supervisor now to start supervisor, this will make sure supervisor runs at startup as well.

supervisor searches for configuration file in following paths: /usr/local/etc/supervisord.conf, /usr/local/supervisord.conf, supervisord.conf, etc/supervisord.conf, /etc/supervisord.conf, /etc/supervisor/supervisord.conf

we have to create one in order for it to work:

@calebporzio
calebporzio / SvgIcon.vue
Created February 19, 2018 19:08
SVG Icon Vue Component
<template>
<div class="inline-block" v-html="require('icon-' + this.icon + '.svg')"></div>
</template>
<style module>
.svg {
fill: currentColor;
height: 1em;
margin-top: -4px;
vertical-align: middle;
@kirkbushell
kirkbushell / Interceptor.js
Created January 7, 2016 22:41
Handling JWT, Vue JS and token refreshes
import Unauthorised from './Unauthorised'
export default function() {
return {
response: function(response) {
switch (response.status) {
case 401: return Unauthorised.handle();
}
return response;
@FoxxMD
FoxxMD / node-api-oauth-proxy.js
Last active February 13, 2018 21:44
A snippet of an express app that authenticates users using oauth and serves apis through a proxy
var express = require("express");
var bodyParser = require("body-parser");
var httpProxy = require('http-proxy');
var url = require('url');
var sessions = require("client-sessions");
// configure session cookie
// sessions encrypts the cookie so even though the client has physical access
// the information it holds is not revealed (client's access token)
@PhillippOhlandt
PhillippOhlandt / nothingToDoHereFunction
Created May 20, 2015 10:00
Nothing to do here ASCII function
function nothingToDoHere($newLine = '<br>'){
return '
──────█▀▄─▄▀▄─▀█▀─█─█─▀─█▀▄─▄▀▀▀─────'.$newLine.'
──────█─█─█─█──█──█▀█─█─█─█─█─▀█─────'.$newLine.'
──────▀─▀──▀───▀──▀─▀─▀─▀─▀──▀▀──────'.$newLine.'
─────────────────────────────────────'.$newLine.'
───────────────▀█▀─▄▀▄───────────────'.$newLine.'
────────────────█──█─█───────────────'.$newLine.'
────────────────▀───▀────────────────'.$newLine.'
─────────────────────────────────────'.$newLine.'