Skip to content

Instantly share code, notes, and snippets.

View mucahitnezir's full-sized avatar
🎯
Focusing

Mücahit Nezir mucahitnezir

🎯
Focusing
View GitHub Profile
@lukecav
lukecav / functions.php
Created September 15, 2017 19:59
Bypass logout confirmation in WooCommerce
function wc_bypass_logout_confirmation() {
global $wp;
if ( isset( $wp->query_vars['customer-logout'] ) ) {
wp_redirect( str_replace( '&', '&', wp_logout_url( wc_get_page_permalink( 'myaccount' ) ) ) );
exit;
}
}
add_action( 'template_redirect', 'wc_bypass_logout_confirmation' );
@towfiqpiash
towfiqpiash / empty-value-for-port-specified.md
Created July 23, 2017 05:07
phpmyadmin with Mysql 5.7 - Empty value for 'port' specified

That's because you have the MySQL Password Validation plugin enabled (If you just type 'Y' to the dbconfig-common steps it will be enabled). I find it causes more trouble than good and its requirements (even on low) are superfluous for most. To disable it you'll want to run "UNINSTALL PLUGIN validate_password" once logged into the MySQL server, then try the GRANT again

@codediodeio
codediodeio / auth.guard.ts
Last active August 28, 2020 02:50
Angular Firebase Router Guard with Browser Refresh
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { AngularFireAuth } from 'angularfire2/auth';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/take';
@Injectable()
export class AuthGuard implements CanActivate {
@yosukehasumi
yosukehasumi / git-auto-deploy.md
Last active July 25, 2023 20:07
Setting Up Git-Auto-Deploy on Digital Ocean

Install software-properties-common

sudo apt-get install software-properties-common

Add Repo

sudo add-apt-repository ppa:olipo186/git-auto-deploy
@joshnuss
joshnuss / app.js
Last active March 4, 2024 00:01
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@michaelconnor00
michaelconnor00 / aws_eb_django_commands.md
Last active August 9, 2020 05:46
Run Django Commands from AWS Elastic Beanstalk Virtual Environment

How to run manage.py from AWS Elastic Beanstalk

Note this is for eb python platform, it is different for Docker

Location of Current App:

  cd /opt/python/current/app
@ridvanucok
ridvanucok / vergi_daireleri.sql
Created October 7, 2014 23:22
Türkiye Vergi Daireleri Veri Tabanı // Turkey Tax Departments Database
CREATE TABLE `vergi_daireleri` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`plaka` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
`il` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`ilce` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`daire` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
INSERT INTO vergi_daireleri (id, plaka, il, ilce, daire) VALUES (1, '01', 'ADANA', 'Merkez', '5 Ocak Vergi Dairesi Müdürlüğü');
@firepol
firepol / bootstrap_ms.css
Last active September 23, 2020 19:14 — forked from andyl/bootstrap_ms.css
updated max-width: 767px to avoid breaking the existing behavior on col-sm
.col-ms-1,
.col-ms-2,
.col-ms-3,
.col-ms-4,
.col-ms-5,
.col-ms-6,
.col-ms-7,
.col-ms-8,
.col-ms-9,
.col-ms-10,
@rxaviers
rxaviers / gist:7360908
Last active June 25, 2024 20:06
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: