Skip to content

Instantly share code, notes, and snippets.

View TomashKhamlai's full-sized avatar

Tomash Khamlai TomashKhamlai

  • Zfort Group
  • Asia/Ho_Chi_Minh
View GitHub Profile
@knowuh
knowuh / convert_sass_to_scss
Created September 2, 2011 20:03
convert sass to scss by example
#convert .sass files to scss files:
bundle exec sass-convert -R --from sass --to scss ./public/stylesheets/sass/
# delete the old sass files:
find ./public/stylesheets/sass -name "*.sass" | xargs rm
# rename the directory.
mv ./public/stylesheets/sass ./public/stylesheets/scss
@mloskot
mloskot / archlinux-install-notes.md
Last active July 28, 2021 12:16
My notes on Arch Linux installation
@leommoore
leommoore / Express_Logging.md
Last active August 20, 2021 19:27
Express - Logging

#Express - Logging The express.js node.js web application framework comes with a built-in logging module called logger which is the connect.js logger. It is really handy to enable and you can use it just like any other Express module. app.use(express.logger());

Without any configuration, the logger middleware will generate a detailed log using what is called the default format. The logger actually supports four predefined log formats: default, short ,tiny, and dev. Each of these predefined formats show various amounts of detail. You can specify one of them this way:

app.use(express.logger('dev'));

If you prefer, you can customize the precise details to be logged using the the following options to format the output of the logger:

@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active May 26, 2024 17:26
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@soarez
soarez / ca.md
Last active June 19, 2024 19:32
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@bennadel
bennadel / angularjs-form-post.htm
Created April 23, 2014 11:43
Posting Form Data With $http In AngularJS
<!doctype html>
<html ng-app="Demo">
<head>
<meta charset="utf-8" />
<title>
Posting Form Data With $http In AngularJS
</title>
</head>
<body ng-controller="DemoController">
@oslego
oslego / gist:f13e136ffeaa6174289a
Last active January 3, 2019 14:24 — forked from sl4m/gist:5091803
create self-signed certificate for localhost
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@rawsh
rawsh / .Xresources
Last active May 26, 2024 03:59
.Xresources theme for rofi and terminal
! *----------------------------*
! | Dotfiles - .Xresources |
! *----------------------------*
! This files contains configuration for:
! * terminal colours
! * urxvt
! * rofi
@RidaRidss
RidaRidss / Solution for No bundle url present. Make sure you’re running a packager server or have included a .jsbundle file in your application bundle.md
Created October 26, 2017 07:09
Got an Error : No bundle url present. Make sure you’re running a packager server or have included a .jsbundle file in your application bundle

Follow these commands

watchman watch-del-all
rm -rf $TMPDIR/react-*
rm -rf build/ios
yarn cache clean
lsof -i :8081
kill -9 9771
kill $(lsof -t -i:8081)

yarn start --reset-cache

@hostep
hostep / composer-v2-support-older-magento2-versions.md
Last active January 27, 2024 10:37
Add composer v2 support to older Magento2 versions

Add composer v2 support to older Magento2 versions

Magento 2.3.7 and 2.4.2 ship with composer v2 support out of the box but as far as I can see the only thing that needs to happen is to use some more modern versions of certain composer plugins which are used by certain dependencies of Magento.

This means we should be able to add composer v2 support to older Magento2 versions as well if we get a bit creative.

See below for diffs of the composer.json files you can apply to your projects, be sure to keep a mental note of these things, they will need to maintained by yourself in case newer versions of these modules are released. And if one day you update to Magento 2.3.7 or 2.4.2 or higher, you can remove these changes again.

⚠️ Disclaimer: use these tricks at your own risk!