What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-27 10:57:02
install laravel globally
composer global require laravel/installer Add solution -
Shell/Bash 2021-08-27 10:53:01
bash how to keep one instance of duplicate lines
# Basic syntax: sort input_file | uniq # Sort the file first because uniq requires a sorted file to work. Uniq # then eliminates all duplicated lines in the file, keeping one instance # of each duplicated line Add solution -
Javascript 2021-08-27 10:34:01
puppeeter
const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.goto('https://news.ycombinator.com', {waitUntil: 'networkidle2'}); await page.pdf({path: 'hn.pdf'... Add solution -
Python 2021-08-27 09:55:01
python convert a dict to list or a list to dict or a slice a dict or sort a dict by key or value without import
#convert dict to list or list to dict or slice a dict #1. convert dict to list temp = [] # not required as [] is mentioned below s = {'b': 3, 'a': 2, 'c': 2, 'd': 1, 'e': 1}#our dict remember temp = [[k,v]for k,v in s.items()]# temp is now list print(temp... Add solution -
Shell/Bash 2021-08-27 09:26:02
create a repo using github api
#On your Github account: go to Settings -> Developer Settings -> Personal Access Token Under OAuth Apps. #Now, Generate a New Access token with Required privileges enabled. Ignore This if you already have one. #Replace ACCESS_TOKEN with Token and ... Add solution -
Javascript 2021-08-27 09:20:01
show preview of input image javascript react
const React = require('react') class Upload extends React.Component { constructor(props){ super(props) this.state = { file: null } this.handleChange = this.handleChange.bind(this) } handleChange(event) { this.setState({ ... Add solution -
Javascript 2021-08-27 08:50:03
serving static files with express
var express = require('express'); var app = express(); var path = require('path'); //app.use(express.static(__dirname)); // Current directory is root app.use(express.static(path.join(__dirname, 'public'))); // "public" off of current is root ... Add solution -
Shell/Bash 2021-08-27 05:34:01
install minecraft server on ubuntu
Step 1: Install the required packages: sudo apt update sudo apt install openjdk-8-jre-headless sudo apt install screen sudo ufw allow 25565 Step 2: Download the latest version of Mindcraft: wget https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1... Add solution -
Shell/Bash 2021-08-27 03:13:02
pip install requirements.txt
pip install -r requirements.txt Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5