Skip to content

Instantly share code, notes, and snippets.

View georgeyord's full-sized avatar

Giorgos Papaefthimiou georgeyord

View GitHub Profile
@georgeyord
georgeyord / mirror.sh
Created September 28, 2020 07:42
Mirror git repo to different repo
#!/usr/bin/env bash
# Create a teml working dir
mkdir -p /tmp/repo-move
cd /tmp/repo-move
# Clone the original repo
git clone --bare [ORIGINAL_REPO]
# Push to target repo
@georgeyord
georgeyord / github-team.py
Created May 30, 2018 10:26 — forked from krusynth/github-team.py
Python script to add all GitHub repositories to an organization team - permission is set to push. You'll need a settings.py file with your organization name and API key. Based off of my GitHub stats script (requirements.txt here): https://github.com/krues8dr/project-migration
#!/usr/bin/python
# Exports a CSV of repo names, readme files, and the license of the project.
from __future__ import print_function
import requests
import json
import settings
from urlparse import urlparse, parse_qs
import sys
@georgeyord
georgeyord / README.md
Last active April 5, 2022 04:41
Dashing Shoutbox widget

Dashing Shoutbox widget

A widget to send a message/announcement/quote etc to a Shoutbox widget.

About

The given scenario is that you want to share a message with the the dashboard viewers using a simple curl request.

Installation

@georgeyord
georgeyord / init.sh
Last active August 29, 2015 14:01
Use a docker image to run angular tutorial (https://docs.angularjs.org/tutorial) the easiest way
# Check out locally the app from Git
git clone --depth=14 https://github.com/angular/angular-phonecat.git
# Build and run the docker image, log in with bash to run the initialization command (it will take some time)
docker run -it --rm -p 8000:8000 -v [absolute path to angular-phonecat]:/data dockerfile/nodejs bash
# When logged in the container
npm install && npm install -g bower && bower --allow-root install && npm start
# When complete check it in browser
@georgeyord
georgeyord / cmd
Last active October 20, 2016 17:44 — forked from elgalu/set_xvfb.sh
Run Protractor in a headless debian linux server
# Run the test commands like this:
xvfb-run npm run protractor
@georgeyord
georgeyord / read.md
Last active August 29, 2015 14:00
MongoDB newbie findings

Schema changes

Show all databases

show dbs;

Use a specific database

use testdb;

Create a new database by using the same command

use testdb;

Show all database collections

show collections

@georgeyord
georgeyord / gist:9502606
Created March 12, 2014 07:53
Change the Primary Document Root in cPanel/WHM
For changing the main/primary domain, you will need to have root SSH access and be able to edit the following files (replacing your user & domain info):
/var/cpanel/userdata/USERNAME/DOMAIN.COM (replace USERNAME and DOMAIN.COM with actual info).
In that file, find these two lines:
documentroot: /home/USERNAME/public_html
path: /home/USERNAME/public_html/cgi-bin
And, edit them accordingly:
@georgeyord
georgeyord / findWrongPermissions
Created February 11, 2014 09:08
Linux - Find files recursively with incorrect permissions
# Assuming that you want directories to be 755 and ordinary files to be 644
find \! -perm 644 -type f -o \! -perm 755 -type d