Skip to content

Instantly share code, notes, and snippets.

View hasusuf's full-sized avatar

Hassan Youssef hasusuf

View GitHub Profile
@songlipeng2003
songlipeng2003 / gist:3366275
Created August 16, 2012 03:25
reset mysql root password without no password in ubuntu
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
# Check if user is root
if [ $(id -u) != "0" ]; then
printf "Error: You must be root to run this script!\n"
exit 1
fi
@taylorotwell
taylorotwell / alert.php
Created November 11, 2016 22:39
Components And Slots
<div class="alert">
{{ $slot }}
</div>
@int128
int128 / gist:14255ff1b1ed11ce1f661a7d35954c2b
Created October 26, 2016 10:18
How to execute a remote command on the Jenkins Script Console
import hudson.util.RemotingDiagnostics;
def node = 'node-name'
def command = 'uname -a'
println RemotingDiagnostics.executeGroovy("""
def p = '$command'.execute()
p.waitFor()
println p.in.text
@epcim
epcim / webex-ubuntu.md
Created April 27, 2017 08:42 — forked from mshkrebtan/webex-ubuntu.md
Run Cisco Webex on 64-bit Ubuntu 16.04

Run Cisco Webex on 64-bit Ubuntu 16.04

With Audio and Screen Sharing Enabled

Enable support for 32-bit executables

Add the i386 architecture to the list of dpkg architectures :

sudo dpkg --add-architecture i386
@jakedsouza
jakedsouza / ubuntu.sh
Created February 17, 2018 00:44
Minimal ubuntu setup
#!/bin/bash
require_root() {
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
}
update_apt() {
@finger-berlin
finger-berlin / beanstald.sh
Created February 29, 2012 16:35
OSX script for easy start & stop beanstalkd (brew version)
#!/bin/sh
daemon=beanstalkd
executable=/usr/local/bin/$daemon
port=11300
waldir=/usr/local/var/beanstalkd
logfile=/usr/local/var/log/beanstalkd.log
interface="127.0.0.1"
params="-l $interface -p $port -b $waldir"
@Mikulas
Mikulas / Dockerfile
Last active March 11, 2022 12:34
Docker image PHP 7.1 alpine with extensions
FROM php:7.1-fpm-alpine
RUN apk add --update \
autoconf \
g++ \
libtool \
make \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install mysqli \
@zburgermeiszter
zburgermeiszter / envsubst-multi.sh
Created December 14, 2017 11:28
Envsubst render multiple files.
for f in $(find deploy/templates -regex '.*\.ya*ml'); do envsubst < $f > "./deploy/generated/$(basename $f)"; done
@jeremyje
jeremyje / install-docker.sh
Last active October 31, 2022 01:09
Install Docker
#!/bin/bash
# curl https://gist.githubusercontent.com/jeremyje/5d2b3746f4454ef24aaa723e208b7a50/raw/install-docker.sh | bash
# Based on https://docs.docker.com/install/linux/docker-ce/debian/
function InstallForDebian {
sudo apt-get update
sudo apt-get -y remove docker docker-engine docker.io
sudo apt-get -y install \
apt-transport-https \
@techjanitor
techjanitor / gcs.go
Created May 9, 2015 04:08
Upload a file to Google Cloud Storage
package main
import (
"errors"
"fmt"
"golang.org/x/oauth2"
"golang.org/x/oauth2/jwt"
storage "google.golang.org/api/storage/v1"
"os"
)