Skip to content

Instantly share code, notes, and snippets.

View hbt's full-sized avatar

Hassen Ben Tanfous hbt

View GitHub Profile

Awesome Go

Build Status Awesome Slack Widget Netlify Status

Sponsorships

Digital Ocean

We have no monthly cost, but we have employees working hard to maintain the Awesome Go, with money raised we can repay the effort of each person involved! All billing and distribution will be open to the entire community.

A cura

Awesome Go

Build Status Awesome Slack Widget Netlify Status

Sponsorships

Digital Ocean

We have no monthly cost, but we have employees working hard to maintain the Awesome Go, with money raised we can repay the effort of each person involved! All billing and distribution will be open to the entire community.

A cura

@hbt
hbt / cvimrc
Created February 4, 2017 19:54
" begin
" Copy paste this into options.html
" first lines copied into options
let configpath = '/home/hassen/.cvimrc'
let homedirectory = '/home/hassen'
" this would load this file into the options page
set localconfig
""""
" end
recoll-1.34.6.tar.gz
# from: https://nmilosev.svbtle.com/termuxfedora-install-fedora-on-your-phone-with-termux
# install:
# - install termux
# - wget this gist
# - sh
apt update && apt install wget -y && /data/data/com.termux/files/usr/bin/wget https://raw.githubusercontent.com/nmilosev/termux-fedora/master/termux-fedora.sh && sh termux-fedora.sh
sh termux-fedora.sh f26_arm64
startfedora
@hbt
hbt / wupload.hack
Created November 13, 2011 06:20
wupload countdown hack --- copy paste script + call CMApplication.Pages.Download.CountDown.hack(); and download files without waiting
// Build on Thu Oct 20 21:06:21 CEST 2011 for language "en"
myHostname = window.location.hostname;
var myTLD = "." + myHostname.substring(myHostname.indexOf("wupload") + "wupload.".length).split(".")[0];
function afterLoad() {
return
}
ieFixForFileSelectionOnChangeEventTimer = null;
function ieFixForFileSelectionOnChangeEvent(a) {
@hbt
hbt / out
Created January 25, 2022 04:28
vagrant@homestead:~/segmetrics.importer$ phpunit
PHPUnit 6.5.14 by Sebastian Bergmann and contributors.
Tests\Integrations\ActiveCampaignTest
✓ import products [0.228s]
✓ sync contact tags [0.024s]
✓ restart after timeout [0.018s]
✓ import contacts [1.767s]
@hbt
hbt / script.bash
Last active September 29, 2021 19:52
#!/usr/bin/env bash
cp /var/www/vhosts/hassen.tiltedpixeldev.com/gh.pub /tmp/gh.pub
cp /var/www/vhosts/hassen.tiltedpixeldev.com/hbt.pub /tmp/hbt.pub
for entry in "/var/www/vhosts"/*pixeldev.com
do
cd $entry
mkdir -p .ssh &> /dev/null
chmod 700 .ssh
@hbt
hbt / script.bash
Last active September 29, 2021 19:12
#!/usr/bin/env bash
for entry in "/var/www/vhosts"/*pixeldev.com
do
cd $entry
mv .ssh/authorized_keys .ssh/auth.bak
done
@hbt
hbt / fix-ownership.sh
Last active September 29, 2021 18:58
#!/usr/bin/env bash
set -euo pipefail bash
for entry in "/home"/*pixeldev.com
do
cd $entry
username=$(stat -c "%U" .)
chown $username:psacln -R .ssh
done