Skip to content

Instantly share code, notes, and snippets.

View m4tlch's full-sized avatar
🏠
Working from home

Paul Nike m4tlch

🏠
Working from home
  • Ukraine
View GitHub Profile
@m4tlch
m4tlch / Mouse Scroll Wheel Speed Setting in Ubuntu
Created August 14, 2022 07:13 — forked from mengtongun/Mouse Scroll Wheel Speed Setting in Ubuntu
Adjust the mouse wheel speed in Ubuntu by using a line of script
Just run this script you can adjust the value of the speed. Thanks to the creator! nicknorton.net
bash <(curl -s nicknorton.net/mousewheel.sh)
@bradtraversy
bradtraversy / typescript-crash.ts
Last active April 8, 2024 15:07
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
// resources/js/models/Model.js
export default class Model {
constructor (attributes = {}) {
this.fill(attributes)
}
static make (attributes = {}) {
return Array.isArray(attributes)
? attributes.map(nested => new this(nested))
// resources/js/services/Form.js
import FormErrors from './FormErrors'
export default class {
constructor (initialData = {}, submitCallback = null) {
this._initialData = initialData
this._submitCallback = submitCallback
this.errors = new FormErrors()
@lorisleiva
lorisleiva / readme.md
Last active December 26, 2021 13:09
Webpack aliases with Laravel Mix

Step 1: configure Webpack aliases

// webpack.mix.js

const mix = require('laravel-mix')
const path = require('path')

// ...

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@lorisleiva
lorisleiva / GoogleApiAccess.md
Last active March 25, 2023 15:52
This gist describes two processes allowing us to access the Google API and to register some webhooks

Access Google API credentials and domain verification

This gist describes two processes allowing us to access the Google API and to register some webhooks. At the end of both processes we will obtain all variable needed to start using their API and we will have whitelisted all necessary URL to get started. We will be using the Google Calendar API and the Google Plus API to access the email address of the user.

This gist has been created as an Appendix to this article (part 1) and this article (part 3).

Note that, I will be using a randomly generated ngrok domain during this presentation. Simply replace b3093b51.ngrok.io with your domain name


@kanibaspinar
kanibaspinar / my.cnf
Last active April 2, 2024 09:37
Mysql My.cnf Optimization - Best Performance For 1000 + Sites Web Server
# Optimized MySQL configuration for cPanel servers by Kani Baspinar - Updated June 2016
#
# The settings provided below are a starting point for a 24GB RAM server with 8 CPU cores.
# If you have less or more resources available you MUST adjust accordingly to save CPU, RAM and disk I/O usage.
# To fine tune these settings for your system, use MySQL DB diagnostics tools like:
# Test your configuration ; https://launchpad.net/mysql-tuning-primer
# or
# http://blog.mysqltuner.com/download/
# Note that if there is NO comment beside a setting, then you don't need to adjust it.
#