Skip to content

Instantly share code, notes, and snippets.

View xdevmaycry's full-sized avatar
🎯
Focusing

devmaycry xdevmaycry

🎯
Focusing
View GitHub Profile
@Beyarz
Beyarz / Dockerfile
Last active March 14, 2024 10:52 — forked from jcavat/Dockerfile
Updated version of: docker-compose with Php 7.2.6, Mysql 8.0.16, Phpmyadmin 4.8 & Apache
FROM php:7.2.6-apache
RUN docker-php-ext-install mysqli
@ArcanisCz
ArcanisCz / createProvider.js
Last active March 22, 2024 05:41
React Error Boundary, which can catch Component + Redux + Saga errors
/*
* Usage:
* const AppProvider = createProvider(rootReducer, rootSaga);
* ...
* <AppProvider>
* <AppComponent>
* </AppProvider>
*/
const createProvider = (reducer, saga) => {
const sagaMiddleware = createSagaMiddleware();
@alexnm
alexnm / server.js
Created March 24, 2018 07:49
Basic setup for React SSR
import express from "express";
import path from "path";
import React from "react";
import { renderToString } from "react-dom/server";
import Layout from "./components/Layout";
const app = express();
app.use( express.static( path.resolve( __dirname, "../dist" ) ) );
@jeffhorton
jeffhorton / Slack Hide User Bookmarklet
Last active December 29, 2017 18:25
Slack Hide User
javascript:(function(){window.rl = window.rl || []; function rlfunc() { $('span.message_sender, a.member').each(function (i, j) { for (var i = 0; i < window.rl.length; i++) { var re = new RegExp(rl[i], "ig"); if (j.className.match(re) || j.textContent.match(re)) { j.closest('ts-message').remove(); console.log('removing', re); } else { console.log('no match', re, j.className); } } } ) } var u = prompt('user partial'); if (u != null) { window.rl.push(u); console.log(window.rl); rlfunc() }; $('body').remove('DOMSubtreeModified', rlfunc()); $('body').on('DOMSubtreeModified', rlfunc());})();
@ibraheem4
ibraheem4 / postgres-brew.md
Last active October 14, 2024 11:59 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@james2doyle
james2doyle / keyup-debouce-timeout.js
Created October 5, 2016 19:29
A debounce timeout trigger for typing in an input. The example is in jQuery, but this works with any event/listener.
$('#input').on('keyup', function() {
// do an ajax save when this input is changed
var val = this.value;
// clear the timeout so we dont fire in succession
clearTimeout(this.delayer);
this.delayer = setTimeout(function () {
console.log(val);
}, 500);
});
@noelboss
noelboss / git-deployment.md
Last active December 1, 2024 00:09
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@dtomasi
dtomasi / default
Last active October 2, 2024 17:41
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active May 22, 2024 02:19
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@leommoore
leommoore / mongodb_3.2.x_security.md
Last active October 19, 2018 00:39
MongoDB 3.2.x Security

#MongoDB 3.2.x Security

##Network Ports The standard ports used by mongo are:

ProcessRoleDefault Port