Skip to content

Instantly share code, notes, and snippets.

View ramajd's full-sized avatar
🎯
Focusing

Reza Alizadeh Majd ramajd

🎯
Focusing
View GitHub Profile
@ErFUN-KH
ErFUN-KH / v2ray-fragment.sh
Created September 23, 2023 16:43
v2ray + ws + cloudflare + fragment
bash <(curl -sL https://bit.ly/realityez)
@MrAndrewMal
MrAndrewMal / journalctl.txt
Last active November 13, 2024 16:11
How to read live-tail logs of multiple services with journalctl
#Systemd - How to read live-tail logs of multiple services with journalctl
sudo journalctl --follow _SYSTEMD_UNIT=docker.service + _SYSTEMD_UNIT=apache2.service
@carolynvs
carolynvs / .gitconfig
Last active October 19, 2022 14:44
git wip - Show what branches you have been working on lately
[alias]
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
@hryniuk
hryniuk / pre-commit-cargo-fmt
Last active February 7, 2024 09:21
Git `pre-commit` hook that checks Rust code style with `cargo fmt`
#!/bin/bash
diff=$(cargo fmt -- --check)
result=$?
if [[ ${result} -ne 0 ]] ; then
cat <<\EOF
There are some code style issues, run `cargo fmt` first.
EOF
exit 1
@s-lyn
s-lyn / MANUAL.md
Created September 15, 2017 10:27
Deploy nodejs app with gitlab.com and pm2

Deploy nodejs app with gitlab.com and pm2

This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:

  • Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
  • Windows 10 on my PC to work.
@jarretmoses
jarretmoses / React Native Clear Cache
Last active November 12, 2024 12:12
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@jason5ng32
jason5ng32 / ocservauto.sh
Last active March 1, 2021 14:21
在 Debian 7+ 自动安装 Ocserv ( Anyconnect VPN ) ,来自 http://www.fanyueciyuan.info/fq/ocserv-debian.html
#!/bin/bash
#===============================================================================================
# System Required: Debian 7+
# Description: Install OpenConnect VPN server for Debian
# Ocservauto For Debian Copyright (C) liyangyijie released under GNU GPLv2
# Ocservauto For Debian Is Based On SSLVPNauto v0.1-A1
# SSLVPNauto v0.1-A1 For Debian Copyright (C) Alex Fang [email protected] released under GNU GPLv2
# Date: 2015-07-10
# Thanks For
@jonleighton
jonleighton / base64ArrayBuffer.js
Last active November 2, 2024 06:08
Encode an ArrayBuffer as a base64 string
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then
// use window.btoa' step. According to my tests, this appears to be a faster approach:
// http://jsperf.com/encoding-xhr-image-data/5
/*
MIT LICENSE
Copyright 2011 Jon Leighton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: