Skip to content

Instantly share code, notes, and snippets.

@mifas
mifas / index.php
Last active Dec 1, 2019
adminer auto login
View index.php
<?php
$_GET["username"] = "";
//$_GET["db"] = "";
function adminer_object() {
class AdminerAutoLogin extends Adminer {
function credentials() {
return array("127.0.0.1", "root", "root");
}
function login($login, $password) {
return true;
@mifas
mifas / git-squash.sh
Created Nov 28, 2019
git branch --squash with simplified commit logs
View git-squash.sh
function git_squash_branch() {
b=$1
git merge --squash "$b"
echo ""
echo ""
git log --reverse --format='%h %s ► %an <%ae>' .."$b"
#git commit -m "$(git log --reverse --format='%h %s ► %an <%ae>' .."$b")"
}
alias gsb="git_squash_branch"
@mifas
mifas / twitter.css
Last active Dec 20, 2019
Twitter Blur the images for privacy
View twitter.css
article > div > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) div[aria-label="Embedded video"] {
filter: blur(10px);
}
article > div > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) div[aria-label="Embedded video"]:active {
filter: none;
}
article > div > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) div[aria-label="Image"] {
filter: blur(10px);
@mifas
mifas / clean_cra.sh
Created Oct 15, 2019
Clean create-react-app default code
View clean_cra.sh
function _craclean(){
rm -rf $1/src/App.js $1/src/App.css $1/src/App.test.js $1/src/index.css $1/src/logo.svg
cat << EOS > $1/src/App.js
import React, { Component } from 'react'
export default class App extends Component {
render() {
return (
<div>
App
</div>
@mifas
mifas / mnews.css
Last active Oct 9, 2019
stylebot - md
View mnews.css
#header-wrapper, #menu-top, #menu-1, .ads-top-big, .sidebar-right, .ads-top-big1, #footer-wrapper,.farhacool,.farhacool1 {
display: none;
}
#outer-wrapper{
box-shadow: unset;
}
================= j
@mifas
mifas / launch.json
Created May 16, 2019
Debug React apps directly from VS Code
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}/src"
}
@mifas
mifas / jsconfig.json
Last active Apr 22, 2019
jsconfig.json
View jsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "es6",
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"paths": {
"*": ["./src/*"]
}
},
@mifas
mifas / bash.sh
Created Jan 14, 2019
Create React App default code cleanup
View bash.sh
function craclean(){
rm -rf $1/src/App.js $1/src/App.css $1/src/App.test.js $1/src/index.css $1/src/logo.svg
cat << EOS > $1/src/App.js
import React, { Component } from 'react'
export default class App extends Component {
render() {
return (
<div>
App
</div>
View temp
"[Palenight Theme]": {
"sideBar.border": "#00000030",
"tab.border": "#0000006c",
"statusBar.border": "#00000030",
"tab.activeBorderTop": "#4d028a",
"tab.activeBorder": "#00000030",
"editorGroupHeader.tabsBorder": "#00000030",
"titleBar.border": "#00000030",
"panel.border": "#00000030",
"activityBar.border": "#00000030",
@mifas
mifas / tmux.conf
Last active Mar 14, 2018 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
View tmux.conf
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000