Skip to content

Instantly share code, notes, and snippets.

Avatar
🖖
Working hard to make the world better with software.

Abhishek K. Singh abheist

🖖
Working hard to make the world better with software.
View GitHub Profile
View draftJsBasic.js
import React from 'react';
import ReactDOM from 'react-dom';
import {Editor, EditorState} from 'draft-js';
function App() {
const [editorState, setEditorState] = React.useState(
EditorState.createEmpty()
);
const editor = React.useRef(null);
View angularRuntime.html
<script type="type/javascript" src="{% static 'frontend/dist/runtime.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/polyfills.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/styles.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/vendor.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/main.js' %}"></script>
View angularCompiledFiles.html
<script type="type/javascript" src="{% static 'frontend/dist/runtime-es2015.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/polyfills-es2015.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/styles-es2015.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/vendor-es2015.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/main-es2015.js' %}"></script>
@abheist
abheist / mysql_install.md
Created Dec 18, 2019 — forked from pratos/mysql_install.md
Uninstall MySQL already present in Digital Ocean(Ubuntu 16.04 LTS) and install-setup again
View mysql_install.md

Installing MySQL 5.7 in Ubuntu 16.04LTS (Note: Things still break in Ubuntu, advisable to move to docker and setup volumes_)

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.7 mysql-client-core-5.7
sudo rm -rf /etc/mysql /var/lib/mysql

Clean-up

sudo apt-get autoremove
@abheist
abheist / .hyper.js
Last active Sep 27, 2019
.hyper.js
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@abheist
abheist / README.md
Created Feb 8, 2018 — forked from addyosmani/README.md
108 byte CSS Layout Debugger
View README.md

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@abheist
abheist / README.md
Created Jul 4, 2017 — forked from naveensingh/README.md
Remove settings and cli-links 0xDBE10, AppCode, CLion, IntelliJ, PhpStorm, PyCharm, Rider, RubyMine, WebStorm (OS X & macOS)
View README.md

Quick uninstall JetBrains settings:

curl -sL https://gist.githubusercontent.com/naveensingh/a1f951b0a140f6b2a60b6d9975310cef/raw/55664d05dfb3242ba02411da076357a521cd21c4/jetbrains-backup.sh | bash -s

Quick backup JetBrains settings:

curl -sL https://gist.githubusercontent.com/naveensingh/a1f951b0a140f6b2a60b6d9975310cef/raw/55664d05dfb3242ba02411da076357a521cd21c4/jetbrains-backup.sh | bash -s
@abheist
abheist / smashingmagazine.js
Created Jan 12, 2017 — forked from luruke/smashingmagazine.js
Source code of the demo "Improving User Flow Through Page Transitions" on Smashing Magazine.
View smashingmagazine.js
/*
https://www.smashingmagazine.com/2016/07/improving-user-flow-through-page-transitions/
You can copy paste this code in your console on smashingmagazine.com
in order to have cross-fade transition when change page.
*/
var cache = {};
function loadPage(url) {
if (cache[url]) {
View gist:a15378bea76616dc03d8a0e7645b9926
ps -ax | grep mysql
stop and kill any MySQL processes
brew remove mysql
brew cleanup
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/var/mysql
sudo rm -rf /usr/local/mysql*
sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
@abheist
abheist / freshdesk_sso.py
Created Aug 2, 2016
Freshdesk Single Sign On (SSO) in python
View freshdesk_sso.py
from datetime import datetime
import hmac
def ticket_login():
digest_maker = hmac.new('---------SECRET SHARED KEY---------')
url = "http://portalname.freshdesk.com/login/sso?name={0}&email={1}&timestamp={2}&hash={3}"
digest_maker.update('abhishek')
digest_maker.update('abhishek@abhishek.com')
td = datetime.utcnow()-datetime(1970,1,1)
ts = str(int(td.total_seconds()))
You can’t perform that action at this time.