Skip to content

Instantly share code, notes, and snippets.

View parmonov98's full-sized avatar
🎯
web -> front-end

Murod parmonov98

🎯
web -> front-end
View GitHub Profile
@dtrce
dtrce / mp3.js
Created September 8, 2011 18:39
streaming mp3 using nodejs
var http = require('http'),
fileSystem = require('fs'),
path = require('path')
util = require('util');
http.createServer(function(request, response) {
var filePath = 'path_to_file.mp3';
var stat = fileSystem.statSync(filePath);
response.writeHead(200, {
@zeroasterisk
zeroasterisk / mime.types
Created May 7, 2013 19:42
nginx config: /etc/nginx/mime.types
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
application/atom+xml atom;
application/rss+xml rss;
@zloynemec
zloynemec / adminer_setup.sh
Created April 15, 2015 12:29
Secure adminer nginx setup
# Secure adminer setup
# Author Taras Kozlov
# download adminer to separate directory
mkdir -p /var/www/admin
cd /var/www/admin
wget http://www.adminer.org/latest.php -O adminer.php
echo '<?php phpinfo(); >' > info.php
sudo -i
@dale-c-anderson
dale-c-anderson / whois.php
Last active February 11, 2024 08:49
Simple PHP whois lookup script
<form method=GET action="<?php htmlentities(basename(_FILE_)); ?>">
<input type=text name="q" value="<?php echo htmlentities($_REQUEST["q"]); ?>">
<input type=submit value="WHOIS">
</form>
<pre><?php
/*
* whois.php
*/
main();
@james2doyle
james2doyle / ios-chrome-devtools.md
Last active July 20, 2024 16:11
Enable remote debugging on the iOS simulator using Chrome Dev Tools

Install the tools:

brew install ios-webkit-debug-proxy

Run the simulator. And choose an iOS 10 device. The chrome remote debugging doesn't work with iOS 11 yet.

Enable the inspector

@trkrameshkumar
trkrameshkumar / request.js
Created November 24, 2017 10:14 — forked from sheharyarn/request.js
Axios Request Wrapper for React
/**
* Axios Request Wrapper
* ---------------------
*
* @author Sheharyar Naseer (@sheharyarn)
* @license MIT
*
*/
import axios from 'axios'
@MatteoOreficeIT
MatteoOreficeIT / LaravelQueryJoinRelations.php
Last active October 14, 2023 08:45
Laravel Query Join through Relations
<?php
/**
* User: matteo.orefice
* Date: 16/02/2018
* Time: 16:57
*/
namespace MatteoOrefice\Illuminate\Database\Eloquent\Concerns;
@Grendel7
Grendel7 / nginx-multiple-php-apps-in-subdirs.conf
Created April 23, 2018 17:55
Example NGINX config file which loads different PHP-FPM apps from subdirectories
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /home/app/html/public;
index index.php index.html index.htm;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
import React from "react"
class Form extends React.Component {
state = {
cats: [{name:"", age:""}],
owner: "",
description: ""
}
handleChange = (e) => {
if (["name", "age"].includes(e.target.className) ) {
let cats = [...this.state.cats]
@bradtraversy
bradtraversy / docker-help.md
Last active November 15, 2024 17:06
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info