Skip to content

Instantly share code, notes, and snippets.

View b23prodtm's full-sized avatar

TiB Rkt Arimana b23prodtm

View GitHub Profile
@tstellanova
tstellanova / install-docker-arm64.sh
Last active July 31, 2022 18:00
Install docker CE for arm64
#!/bin/bash
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
@dansuh17
dansuh17 / unsubmodule.md
Created May 29, 2018 06:10 — forked from ryaninvents/unsubmodule.md
Convert git submodule to regular directory

From Stack Overflow.

# Fetch the submodule commits into the main repository
git remote add submodule_origin git://url/to/submodule/origin
git fetch submodule_origin

# Start a fake merge (won't change any files, won't commit anything)
git merge -s ours --no-commit submodule_origin/master
@SpekkoRice
SpekkoRice / checkPHPVersion
Last active July 21, 2020 07:40
Bash: Check the version of PHP
#!/bin/bash
# Function to check if the PHP version is valid
checkPHPVersion() {
# The current PHP Version of the machine
PHPVersion=$(php -v|grep --only-matching --perl-regexp "5\.\\d+\.\\d+");
# Truncate the string abit so we can do a binary comparison
currentVersion=${PHPVersion::0-2};
# The version to validate against
minimumRequiredVersion=$1;
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@leonelquinteros
leonelquinteros / Mysql.php
Created July 17, 2013 00:19
Improved MySQL datasource for CakePHP. Includes support for missing (and needed) field types like LONGTEXT and MEDIUMTEXT
<?php
/**
* MySQL layer for DBO
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
@Mins
Mins / mysql_secure.sh
Last active February 16, 2024 00:03
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@webjay
webjay / gh_hook.php
Last active January 7, 2023 11:54
Php hook script that can git pull, apc_clear_cache() etc
<?php
ignore_user_abort(true);
function syscall ($cmd, $cwd) {
$descriptorspec = array(
1 => array('pipe', 'w'), // stdout is a pipe that the child will write to
2 => array('pipe', 'w') // stderr
@jewelsea
jewelsea / JQueryWebView.java
Created July 9, 2012 18:05
Embeds jQuery in a document loaded into a WebView.
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import org.w3c.dom.Document;
/**
@anjackson
anjackson / SwingFXWebView.java
Created January 19, 2012 15:41
Embedding a JavaFX WebView in a Swing panel.
import com.sun.javafx.application.PlatformImpl;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javafx.application.Platform;
import javafx.collections.ObservableList;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Group;
import javafx.scene.Node;