Skip to content

Instantly share code, notes, and snippets.

View anuragteapot's full-sized avatar
🔥
try {} catch(err) {}

Anurag Kumar anuragteapot

🔥
try {} catch(err) {}
View GitHub Profile
@anuragteapot
anuragteapot / mysql-docker.sh
Created September 6, 2019 22:04 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
<template>
<div class="lazy_breadcrumbs">
<ul class="breadcrumbs breadcrumbs_type">
<li
v-for="(item, index) in diskLoaded"
:item="item"
:key="item.id"
:class="`breadcrumbs__item ${index === diskLoaded.length-1 ? 'breadcrumbs__item_active' : ''}`"
>
<span class="breadcrumbs__element" v-if="index === diskLoaded.length-1">{{ item.text }}</span>
@anuragteapot
anuragteapot / ID.js
Created July 1, 2019 21:39
ID - a unique ID/name generator for JavaScript
// Generate unique IDs for use as pseudo-private/protected names.
// Similar in concept to
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>.
//
// The goals of this function are twofold:
//
// * Provide a way to generate a string guaranteed to be unique when compared
// to other strings generated by this function.
// * Make the string complex enough that it is highly unlikely to be
// accidentally duplicated by hand (this is key if you're using `ID`
@anuragteapot
anuragteapot / docker-help.md
Created June 12, 2019 20:38 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@anuragteapot
anuragteapot / MediaPlayer.vue
Created December 31, 2018 07:21
Media Player based on Vue.
<template>
<div id="media-music-player">
<div class="audioContainer">
<a class="nav-icon" v-on:click="isPlaylistActive=!isPlaylistActive" :class="{'isActive': isPlaylistActive}" title="Music List">
<span></span>
<span></span>
<span></span>
</a>
<div class="audioPlayerList" :class="{'isActive': isPlaylistActive}">
<div class="item" v-for="(item,index) in musicPlaylist" :key="index" v-bind:class="{ 'isActive':isCurrentSong(index) }" v-on:click="changeSong(index),isPlaylistActive=!isPlaylistActive">
@anuragteapot
anuragteapot / gist:ecd6878801f389599cdf562acb6d01f6
Created December 13, 2018 09:45 — forked from rxaviers/gist:7360908
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:
@anuragteapot
anuragteapot / Fix network problem in Ubuntu
Last active March 6, 2019 21:59
How to solve Realtek RTL8723BE weak wifi signal problem in ubuntu
1. Go. https://github.com/lwfinger/rtlwifi_new
2. Download Master Branch
3. make
4. sudo make install
5. sudo modprobe -rv rtl8723be
6. sudo modprobe -v rtl8723be ant_sel=2
7. echo "options rtl8723be ant_sel=2" | sudo tee /etc/modprobe.d/50-rtl8723be.conf
Done!
@anuragteapot
anuragteapot / closeConnection.php
Created November 13, 2018 15:13 — forked from bubba-h57/closeConnection.php
Easy way to close connections to the browser and continue processing on the server.
<?php
/**
* Close the connection to the browser but continue processing the operation
* @param $body
*/
public function closeConnection($body, $responseCode){
// Cause we are clever and don't want the rest of the script to be bound by a timeout.
// Set to zero so no time limit is imposed from here on out.
set_time_limit(0);
@anuragteapot
anuragteapot / MSW.circ
Last active November 13, 2018 13:29
MSW - Machine with Shuffled Wires
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project source="2.7.1" version="1.0">
This file is intended to be loaded by Logisim (http://www.cburch.com/logisim/).
<lib desc="#Wiring" name="0"/>
<lib desc="#Gates" name="1"/>
<lib desc="#Plexers" name="2"/>
<lib desc="#Arithmetic" name="3"/>
<lib desc="#Memory" name="4">
<tool name="ROM">
<a name="contents">addr/data: 8 8
@anuragteapot
anuragteapot / snake.asm
Created November 13, 2018 04:46 — forked from PraveshKoirala/snake.asm
8086 Snake game MASM compatible
;*******************************************************************************************************************
; Snake Game By *
; HERO-DAI *
;*******************************************************************************************************************
;code is not well-commented, sorry about that, I'll try to comment it nice and well, but can't make any
;promises, Also, this code writes directly into the video memory instead of int 21H (21H is slow) except
;at some certain points (like displaying scores and the intro)
;and next time someone tells you to not use goto, ask them to code in assembly without goto... :P