Skip to content

Instantly share code, notes, and snippets.

Raymond Médédé KPATCHAA rmkpatchaa

Block or report user

Report or block rmkpatchaa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
// Before backup
sudo sysctl debug.lowpri_throttle_enabled=0
// After backup
sudo sysctl debug.lowpri_throttle_enabled=1
// From
rmkpatchaa /
Last active Sep 27, 2019
Find WIFI Password
# Windows
netsh wlan show profile NOM_DU_RESEAU_WIFI key=clear
# Mac
security find-generic-password -wa NOM_DU_RESEAU_WIFI
# Linux
sudo cat /etc/NetworkManager/system-connections/NOM_DU_RESEAU_WIFI | grep psk=
# From
rmkpatchaa / index.html
Created Aug 8, 2019
Text overlay on image
View index.html
.overlay-image {
position: relative;
width: 900px;
height: 600px;
background: url( no-repeat center center fixed;
background-size: cover;
rmkpatchaa / index.js
Created Apr 16, 2019
JS : Remove array duplicates
View index.js
const array = [1,2,3,4,2,3,4,2,3,4,5,6,7,6,7,6,7,8,9];
[ Set(array)];
array.filter((item, index) => array.indexOf(item) === index);
array.reduce((unique, item) =>
rmkpatchaa /
Created Apr 10, 2019
Git Detached Head

The intermediate steps of an interactive rebase are done with a detached HEAD (partially to avoid polluting the active branch’s reflog). If you finish the full rebase operation, it will update your original branch with the cumulative result of the rebase operation and reattach HEAD to the original branch. My guess is that you never fully completed the rebase process; this will leave you with a detached HEAD pointing to the commit that was most recently processed by the rebase operation.

To recover from your situation, you should create a branch that points to the commit currently pointed to by your detached HEAD:

git branch temp git checkout temp (these two commands can be abbreviated as git checkout -b temp)

This will reattach your HEAD to the new temp branch.

View scrollToTop.jsx
import React from 'react'
import styled from 'styled-components'
class ScrollingWrapper extends React.Component {
state = { hasScrolled: false }
componentDidMount() {
this.scrollingWrapper.addEventListener('scroll', this.onScroll)
rmkpatchaa /
Created Feb 20, 2019 — forked from gielcobben/
Optimise your pngs from the terminal in OSX

$ brew install jpegoptim
$ find . -name "*.jpg" -exec jpegoptim -m80 -o -p --strip-all {} \;

- PNG:
$ brew install optipng
$ find . -name "*.png" -exec optipng -o7 {} \;

View TabbingThroughInputs.js
import React from 'react';
import {
} from 'react-native';
class App extends React.Component {
constructor(props) {
rmkpatchaa / android_app_build.gradle
Last active Nov 1, 2018
React Native build number
View android_app_build.gradle
import groovy.json.JsonSlurper
def getNpmVersion() {
def inputFile = new File("../package.json")
def packageJson = new JsonSlurper().parseText(inputFile.text)
return packageJson["version"]
/* calculated from git commits to give sequential integers */
def getGitVersion() {
rmkpatchaa / regex.js
Created Sep 17, 2018 — forked from tylerzey/regex.js
A List Of Helpful Regex Examples
View regex.js
let re;
//this looks for the string between the slashes. it'll match hello but not HeLlo.
re = /hello/;
//the lower case i means be case insensitive. this will match HellO.
re = /hello/i;
// explaination for common search characters
You can’t perform that action at this time.