Skip to content

Instantly share code, notes, and snippets.

View buster95's full-sized avatar
🦖

Walter Corrales buster95

🦖
View GitHub Profile
@buster95
buster95 / npm-registry-licenses.txt
Created September 27, 2021 04:15 — forked from robertkowalski/npm-registry-licenses.txt
The licenses in the npm-registry from their package.json, from the latest version of each module 23.11.2013
The licenses in the npm-registry from their package.json, from the latest version of each module
23.11.2013
[ { key: 'undefined', value: 27785 },
{ key: 'MIT', value: 20811 },
{ key: 'BSD', value: 5240 },
{ key: 'BSD-2-Clause', value: 621 },
{ key: 'Apache 2.0', value: 263 },
{ key: 'GPL', value: 233 },
@buster95
buster95 / gist:2d670263fcce642f547e91650fb90026
Created November 26, 2020 22:32 — forked from idiom/gist:5716494
Building Mozilla NSS (Network Security Services) on Windows
1. Download & Install Visual Studio 2010 - Version able to compile C++
2. Download and Install Mozilla build files http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe
3. Download the latest NSS package from: http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/
Download the tar with npsr
4. Create a directory C:\src
5. Extract nss to c:\src
So this will end up looking like c:\src\nss-3.15
6. Run the Mozilla build shell: C:\mozilla-build\start-msvc10.bat
7. Create the required env variables
Type: export OS_TARGET="WINNT"
@buster95
buster95 / PrivateRoute.js
Created November 17, 2020 20:10
Conditional Route for react-router. tags: #react #react-router
import React from 'react'
import {
Route,
Redirect
} from 'react-router-dom'
class PrivateRoute extends React.Component {
render() {
const { component: Component, ...rest } = this.props
@buster95
buster95 / GitCommitEmoji.md
Created November 13, 2020 17:08 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@buster95
buster95 / POST.md
Created September 6, 2020 17:26 — forked from rikukissa/POST.md
React Hook prompting the user to "Add to homescreen" 🏠 #PWA #React
title slug createdAt language preview
React Hook prompting the user to "Add to homescreen"
react-hook-prompting-the-user-to-add
2018-11-29T20:35:02Z
en
Simple React Hook for showing the user a custom "Add to homescreen" prompt.

React Hook for showing custom "Add to homescreen" prompt

@buster95
buster95 / mysql_secure.sh
Created May 8, 2020 14:20 — forked from Mins/mysql_secure.sh
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@buster95
buster95 / readme.md
Created April 20, 2020 03:40 — forked from RaVbaker/readme.md
[HOWTO] Rewrite all urls to one index.php in Apache

Redirect All Requests To Index.php Using .htaccess

In one of my pet projects, I redirect all requests to index.php, which then decides what to do with it:

Simple Example

This snippet in your .htaccess will ensure that all requests for files and folders that does not exists will be redirected to index.php:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d

@buster95
buster95 / delete_git_submodule.md
Created April 1, 2020 04:17 — forked from myusuf3/delete_git_submodule.md
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
[
{
"Name": "Afghanistan",
"cca2": "AF",
"cca3": "AFG",
"ccn3": 4
},
{
"Name": "Albania",
"cca2": "AL",
@buster95
buster95 / BitbucketPipelines2Firebase.md
Last active February 25, 2020 22:50 — forked from DawidvanGraan/BitbucketPipelines2Firebase.md
Deploy your Angular 2 project with Bitbucket Pipelines to Firebase Hosting

Deploy your Angular 2 project with Bitbucket Pipelines to Firebase Hosting

Firebase

Please see the Firebase setup instruction to setup a project on Firebase.

Firebase CI Token

To run the firebase deploy command you need to obtain a login token from Firebase. To do so, run the firebase login:ci on your command line which will generate a token. Copy the generated token.

Environment Variables

Goto your project in Bitbucket, open the Settings and select Environment variables.