Skip to content

Instantly share code, notes, and snippets.

@bwydoogh
bwydoogh / phpversion.sh
Last active May 8, 2024 08:15 — forked from vjandrea/phpversion.sh
Change php cli version in plesk (to version 7.0)
#!/bin/sh
printf "Switching php to version 7.0 with symlinks.\n"
printf "Press any key to continue...\n"
read CONTINUE
printf "Creating backups..."
# Backup original binaries
@msmuenchen
msmuenchen / 00_MAIN.md
Last active May 8, 2024 08:14
Patching around the Samsung Wearable ecosystem for fun and (no) profit

tl;dr: Samsung is a bunch of crap company that doesn't inform their customers about serious limitations on their Wearables lineup. Great hardware, dog poo software.

So, what's this about: Samsung omits a bunch of crucial information for consumers anywhere on the Galaxy Watch product pages - at least on those for the Galaxy Watch 4, Galaxy Watch 5 or Galaxy Watch 6.

They omit on the product pages, the pages that should inform a consumer about requirements and limitations, that:

  1. unless you're rooted, the companion phone actually must be a phone, tablets and even phablets like the Galaxy Tab Active 3 are not supported. (If you're rooted, you can patch that away. Just follow along for the guide)
  2. only certain wearables
@MuhsinFatih
MuhsinFatih / pythondoneright.md
Last active May 8, 2024 08:13
How to recover from messed up python installation on mac, and never have to mess with apple's shitty python confusion factory

I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.

What the hell?

Here is what I had messed up, which you also probably did:

  • I had too many different python interpreters
  • Too many different symlinks which I lost track of
  • almost no package I installed with pip worked without a headache
  • any attempt to fix using online resources made it worse.
@niutech
niutech / hosts
Last active May 8, 2024 08:13
/etc/hosts file for blocking Microsoft Edge tracking domains (and more)
0.0.0.0 a-0001.a-msedge.net
0.0.0.0 a-0002.a-msedge.net
0.0.0.0 a-0003.a-msedge.net
0.0.0.0 a-0004.a-msedge.net
0.0.0.0 a-0005.a-msedge.net
0.0.0.0 a-0006.a-msedge.net
0.0.0.0 a-0007.a-msedge.net
0.0.0.0 a-0008.a-msedge.net
0.0.0.0 a-0009.a-msedge.net
0.0.0.0 a-msedge.net
@ErosLever
ErosLever / get-css-selector.js
Last active May 8, 2024 08:12
JS GetCssSelector function - Handy function to get the full CSS selector of any element in the page
// you can include this from: https://cdn.rawgit.com/ErosLever/51c794dc1f2bab888f571e47275c85cd/raw/get-css-selector.js
/**
* Handy function to get the full CSS selector of any element in a web page
* @param {Element} e - the Element whose selector will be returned
* @returns {string} s - the complete CSS Selector including all ancestors elements
*/
function getFullSelector(e){
var s = "", t, i, c, p, n;
do{
t = e.tagName.toLowerCase();
@danielwetan
danielwetan / nodejs-cicd-github-actions.md
Last active May 8, 2024 08:10
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder

# put your network device into monitor mode
# Turn off Int
Set interface down
sudo ip link set wlan0 down
# Set monitor mode
iwconfig wlan0 mode monitor
# Turn up interface
ip link set wlan0 up
@agungf
agungf / cara akses pakai jquery
Created January 21, 2012 06:55
indonesia operators regex
var phoneNumber = '08111111'; //nomor yang akan di test
$.each(operators, function(service, operator) {
//console.log("%o : %o ", service, operator);
if (operator["pattern"].test(phoneNumber)) {
//do some thing with here or simple alert (for testing)
alert("%s iku cocok karo: $s -> jeneng produk'e: $s soko operator %s", phoneNumber, operator["pattern"], service, operator["name"]);
else
console.log("%s iku gak cocok: $o", phoneNumber, operator);
}
@nathanpeck
nathanpeck / speed-ecs-deploy.ts
Created August 29, 2019 15:00
An AWS CDK deployment to AWS Fargte, optimized for speed
import ec2 = require('@aws-cdk/aws-ec2');
import ecs = require('@aws-cdk/aws-ecs');
import elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');
import cdk = require('@aws-cdk/core');
class PublicFargateService extends cdk.Stack {
constructor(scope: cdk.App, id: string) {
super(scope, id);
// Create VPC and Fargate Cluster