Skip to content

Instantly share code, notes, and snippets.

@shinebayar-g
shinebayar-g / xz-backdoor.md
Created March 29, 2024 23:53 — forked from thesamesam/xz-backdoor.md
xz-utils backdoor situation

FAQ on the xz-utils backdoor

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that gives developers lossless compression. This package is commonly used for compressing release tarballs, software packages, kernel images, and initramfs images. It is very widely distributed, statistically your average Linux or macOS system will have it installed for

@shinebayar-g
shinebayar-g / gist:d4f2ec75141fc83a6de73bb72ab13ca7
Created August 25, 2023 14:51 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:

As far as I can tell, you can't do it conveniently. That is, git-rebase does not give you an option to preserve the committer date. Unless you give the --ignore-date (or its alias, --reset-author-date) option, it will always preserve the author date. However, there is no way to make git-rebase preserve the committer date, unless some manual script is crafted.

The best you can do is to make the committer date equal to the author date. Recently (in 2020 Q4), git-rebase --interactive has gained the ability to use the --committer-date-is-author-date flag with the interactive rebase. Before that, there was no way of influencing the committer date at all with the interactive rebase. Note that this flag does not preserve the committer date. It merely makes the committer date equal to the author date.

You might be thinking "well, isn't that effectively preserving the committer date, since normally the committer date is always equal to the author date?". Normally, you would be correct. However, there

@shinebayar-g
shinebayar-g / Count Code lines
Created February 3, 2023 06:37 — forked from amitchhajer/Count Code lines
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n
@shinebayar-g
shinebayar-g / mn_aimag_hot_duureg_horoo.sql
Created December 15, 2020 14:05 — forked from anonymous/mn_aimag_hot_duureg_horoo.sql
Монгол улсын хот, аймаг, дүүрэг, хороодын мэдээллийн бааз. By Анхаа Анхбаяр
-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.5.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
version: "2.1"
services:
erxes-ui:
image: erxes/erxes:develop
restart: unless-stopped
environment:
REACT_APP_CDN_HOST: https://{DOMAIN}/widgets
REACT_APP_API_URL: https://{DOMAIN}/api
REACT_APP_API_SUBSCRIPTION_URL: wss://{DOMAIN}/api/subscriptions
@shinebayar-g
shinebayar-g / docker-compose.yml
Created October 21, 2020 23:11 — forked from tareksamni/docker-compose.yml
Example of using docker-compose health checks
version: '2.1'
services:
db:
image: bla_bla:1234/mysql:5.6
environment:
- MYSQL_ROOT_PASSWORD=XXXX
- MYSQL_DATABASE=bla_bla_dev
- MYSQL_USER=XXXX
- MYSQL_PASSWORD=XXXX
ports:
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
@shinebayar-g
shinebayar-g / deploy-create-react-app-with-nginx.md
Created May 31, 2020 23:38 — forked from huangzhuolin/deploy-create-react-app-with-nginx.md
[Deploy create-react-app(react-router) with nginx] #react #nginx

Create-react-app

Create React apps with no build configuration.

Thanks to create-react-app. It's saves a lot of my time. I remember several months ago I had to setup a lot just for a react app, webpack, babel, test environment and so on... Fortunately, everything becomes easy now. Though you have many choices of start boiler plate, you worth trying this.

React router

If you are build a SPA with react, you probably use react-router.

@shinebayar-g
shinebayar-g / block-tor.sh
Last active December 18, 2018 10:28 — forked from tiagoad/block-tor.sh
Cronjob to block tor exit nodes with nginx on debian 8 jessie (tested on Ubuntu 16.04 , 18.04)
wget -qO- https://check.torproject.org/exit-addresses | grep ExitAddress | cut -d ' ' -f 2 | sed "s/^/deny /g; s/$/;/g" > /etc/nginx/conf.d/tor-block.conf; systemctl reload nginx