Skip to content

Instantly share code, notes, and snippets.

@backviet
backviet / telegram-desktop-multiple-accounts.rst
Created June 25, 2024 04:10 — forked from Nachtalb/telegram-desktop-multiple-accounts.rst
Add multiple accounts in Telegram Desktop [Linux | MacOSX | Windows]
@backviet
backviet / isolate_demo.dart
Last active June 25, 2024 16:35 — forked from jebright/main.dart
Using an Isolate in Flutter
import 'dart:async';
import 'package:flutter/material.dart';
import 'dart:isolate';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
@backviet
backviet / node_uninstall.sh
Last active March 19, 2022 17:29
npm helper
#!/usr/bin/env bash
echo "current version $(node --version)"
currpath=$PWD
cd /usr/local/include
rm -R node
cd /usr/local/lib
rm -R node_modules
@backviet
backviet / wordpress_com_nginx_proxy_to_subpath.md
Created March 8, 2022 07:08 — forked from bzamecnik/wordpress_com_nginx_proxy_to_subpath.md
Nginx proxy for Wordpress.com on custom domain with subpath.
@backviet
backviet / nginx-tuning.md
Created January 28, 2021 16:42 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@backviet
backviet / semantic-commit-messages.md
Created December 6, 2020 12:04 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@backviet
backviet / resolve_install_cocoapods_error.txt
Last active June 16, 2020 13:30
This ia a note for fixing an error which was happen when install new version of cocoapods
Fail to Building native extensions. on Mac OSX
This might be specific to MacOS 10.14. Apparently some development files got moved, or stopped getting installed by default, or...something. A couple of people have recommended running some variation of this:
$ open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
References:
https://blog.driftingruby.com/updated-to-mojave/
https://desiredpersona.com/install-jekyll-on-macos/
https://stackoverflow.com/questions/46377667/docker-for-mac-mkmf-rb-cant-find-header-files-for-ruby
@backviet
backviet / flutter_setup.sh
Last active February 16, 2019 15:35
A simple way to setup flutter environment in macOS
#!/usr/bin/env bash
# Save this file in the samle parent forder of flutter sdk
# run commandline:
# $cd /path/to/parent/of/flutter
# $sh flutter_setup.sh
BASE_DIR=$(pwd)
echo "BASE_DIR: $BASE_DIR"
@backviet
backviet / .swiftlint.yml
Created November 15, 2018 02:49 — forked from candostdagdeviren/.swiftlint.yml
Sample SwiftLint file to apply best practices
disabled_rules: # rule identifiers to exclude from running
- variable_name
- nesting
- function_parameter_count
opt_in_rules: # some rules are only opt-in
- control_statement
- empty_count
- trailing_newline
- colon
- comma
@backviet
backviet / IDETemplateMacros.plist
Last active October 20, 2018 02:39
Xcode FILEHEADER template
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>FILEHEADER</key>
<string>
// ___FILENAME___
// ___PROJECTNAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.