Skip to content

Instantly share code, notes, and snippets.

View rescenic's full-sized avatar
🌏
DevOps Engineer

Muhammad Ridwan Hakim, S.T., CPITA, ITPMCP rescenic

🌏
DevOps Engineer
View GitHub Profile
@rescenic
rescenic / configuire.cmd
Created May 28, 2020 16:46 — forked from snallami/configuire.cmd
Reconfigure cygwin
rem This script reconfigures the Cygwin sshd service.
rem It regenerates the computer's host keys. This is necessary
rem when Sysprep is run and a new SID is generated.
@echo off
echo Stopping the Cygwin sshd service...
net stop sshd
echo ERRORLEVEL: %ERRORLEVEL%
@rescenic
rescenic / .bash_profile
Last active June 9, 2020 10:30 — forked from n-st/.bash_profile
Start zsh from bashrc. Useful when you can't use chsh or when the same LDAP account is used both on systems with zsh installed and ones without.
# .bash_profile is executed for login shells,
# .bashrc is executed for interactive non-login shells.
# We want the same behaviour for both, so we source .bashrc from .bash_profile.
# Also, when .bash_profile exists, bash ignores .profile, so we have to source
# it explicitly.
if [ -f "$HOME/.profile" ]; then
. "$HOME/.profile"
fi

if ($wa_no . $wa_text == '') { exit ; }

$exp = explode(' ', $wa_text) ; $text1 = $exp[0]; $text2 = $exp[1]; $text3 = $exp[2];

if ($text1 == 'INFO') {

$msg = "Halo ini bot perpustakaan SLIMS

@rescenic
rescenic / list-dokter-rsmb
Last active September 20, 2021 13:36
list-dokter-rsmb
*KODE DOKTER*
1. THT
*A1: dr. Tety. H. Rahim, Sp. THT-KL*
Senin sd kamis
08.30-11.30
Jum'at
08.30-11.00
Sabtu
08.30-11.00
@rescenic
rescenic / centos7-set-drupal8-permissions.sh
Created November 12, 2021 17:33 — forked from merolhack/centos7-set-drupal8-permissions.sh
Set SELinux, ACL and common permissions to Drupal 8 over CentOs 7
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
echo "0.- Reestablecer el contexto"
sudo restorecon -Rv /var/www/html
echo "1.- Cambiar propietario del webroot de Apache"
@rescenic
rescenic / config
Created November 14, 2021 22:30 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[sendemail]
smtpencryption = tls
@rescenic
rescenic / readme.md
Created November 24, 2021 23:17 — forked from troyfontaine/readme.md
Resize root partition (or how to remove the default /home partition) on CentOS 7 online

Resize root partition (or how to remove the default /home partition) on CentOS 7 online

This requires you to be able to ssh into the instance using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customation-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and

Step 1 - Copy /home Contents

To backup the contents of /home, do the following:

Assuming you have followed all the steps to install / setup WSL2 -> https://docs.microsoft.com/en-us/windows/wsl/install-win10
**Tested on Ubuntu 20.04**
Step 1 - Find out default gateway and DNS servers
- Navigate to `Control Panel\Network and Internet\Network Connections`
- Right click on relevant connection type WiFi or Ethernet and select `Status`
- Status screen will be displayed, click on `Details` button
- Network Connection details screen will be displayed
- Note down `IPv4 default gateway` and `IPv4 DNS Servers` if available
@rescenic
rescenic / windows_and_office_kms_setup.adoc
Created December 17, 2021 10:06 — forked from jerodg/windows_and_office_kms_setup.adoc
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^css/(.*) /wp-content/themes/roots/css/$1 [QSA,L]
RewriteRule ^js/(.*) /wp-content/themes/roots/js/$1 [QSA,L]
RewriteRule ^img/(.*) /wp-content/themes/roots/img/$1 [QSA,L]
RewriteRule ^plugins/(.*) /wp-content/plugins/$1 [QSA,L]