Skip to content

Instantly share code, notes, and snippets.

View felquis's full-sized avatar
💻
Coding since 2011 ☕ fueled by curiosity 🔍 always exploring

Ofelquis G felquis

💻
Coding since 2011 ☕ fueled by curiosity 🔍 always exploring
View GitHub Profile
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@domenic
domenic / 0-github-actions.md
Last active March 28, 2026 15:39
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@felquis
felquis / globals.get.js
Last active July 11, 2017 11:23
Find global variables in the browser, discover global variables a web side is exposing in JavaScript
/*
Usage
global.get() // return Array of globals found
*/
;(function (global) {
function Globals () {}
@soheilpro
soheilpro / example.sh
Last active July 17, 2025 23:50
Easy IIS log file format specification for goaccess.
goaccess -f u_ex150629.log --log-format "$(cat u_ex150629.log | ./goiisformat.sh)" --date-format '%Y-%m-%d' --time-format '%H:%M:%S'
/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
@felquis
felquis / minimal-css-reset.css
Last active April 17, 2016 14:13 — forked from gpessia/minimal-css-reset.css
Minimal CSS Reset, resets margins, paddings and line-heights of every element needed, please adjust the selector below if you need paddings in lists
/**
Minimal CSS Reset
reset margins, paddings and line-heights of every element needed
if you need paddings into li, dl, dd elements, just remove them
from the selector below
Felquis Gimenes
MIT Licence
https://gist.github.com/felquis/1278d5f62dcc5f606bbb
@blasten
blasten / object-fit-edge.css
Last active August 28, 2020 20:12
Adds support to object-fit in Edge.
.fit {
position: absolute;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
width: 100%;
height: 100%;
object-fit: cover;
}
@javilobo8
javilobo8 / download-file.js
Last active May 13, 2025 05:55
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@renanvalentin
renanvalentin / patch.js
Created June 8, 2017 19:33
ReactDOM.findDOMNode monkey patch
const ReactDOM = require('react-dom');
const findDOMNode = ReactDOM.findDOMNode;
ReactDOM.findDOMNode = (component) => {
if (findDOMNode) {
return findDOMNode(...args);
}
if(!component.container) {