Skip to content

Instantly share code, notes, and snippets.

View buster95's full-sized avatar
🦖

Walter Corrales buster95

🦖
View GitHub Profile
@buster95
buster95 / links for auto signin.txt
Last active September 6, 2023 14:09
Google meet auto signin
@buster95
buster95 / objectId-generator.js
Created June 18, 2023 17:07
javascript functions
var mongoObjectId = function () {
var timestamp = (new Date().getTime() / 1000 | 0).toString(16);
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function () {
return (Math.random() * 16 | 0).toString(16);
}).toLowerCase();
};
@buster95
buster95 / puppeter.Dockerfile
Created May 17, 2023 02:02
Dockerfile examples
FROM node:12.18.3
WORKDIR /app
COPY . .
# --production --dev
RUN npm install
RUN apt-get update
# Installing chromium libraries
@buster95
buster95 / combineComponents.tsx
Last active April 15, 2023 04:18
React combine components
// combineComponents.tsx
// https://javascript.plainenglish.io/how-to-combine-context-providers-for-cleaner-react-code-9ed24f20225e
import React, { ComponentProps, FC } from 'react';
export const combineComponents = (...components: FC[]): FC => {
return components.reduce(
(AccumulatedComponents, CurrentComponent) => {
return ({ children }: ComponentProps<FC>): JSX.Element => {
return (
<AccumulatedComponents>
@buster95
buster95 / validator.java
Last active June 16, 2022 14:14
Nicaragua Cedula Validator Java
package denisjtorresg.info;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.JOptionPane;
@buster95
buster95 / slackCommands.jsonc
Last active December 8, 2021 05:53
SlackBody Examples
{
"token": "2XcC2UGO3SJamwSMSqJqJjTh",
"team_id": "T33D257PC",
"team_domain": "moonshotpartners",
"channel_id": "D02FERQPCBU",
"channel_name": "directmessage",
"user_id": "U02EWSAH7C5",
"user_name": "walter.corrales",
"command": "/go1Walter",
"text": "help",
@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