Skip to content

Instantly share code, notes, and snippets.

View motatoes's full-sized avatar
🎯
Focusing

Mohamed Habib motatoes

🎯
Focusing
View GitHub Profile
@motatoes
motatoes / boxstarter.ps1
Last active December 10, 2017 13:42 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
height = 7
width = 7
board_spaces_occupied = [
[ 1, 0, 1, 1, 1, 0, 0],
[ 1, 1, 0, 1, 1, 0, 1],
[ 1, 1, 1, 1, 0, 0, 1],
[ 1, 0, 1, 0, 1, 1, 1],
[ 1, 0, 0, 1, 1, 1, 1],
[ 0, 0, 1, 0, 0, 1, 1],
[ 0, 1, 1, 0, 1, 1, 1],
0xb676dF5f50a680fEd1b0915fbF41Af0452566dc3
@motatoes
motatoes / stopwatch.vue
Last active April 30, 2021 13:05
quick and dirty stopwatch component for vueJS
<template>
<span id="time" v-html="time"></span>
</template>
<style>
</style>
<script>
module.exports = {
### Keybase proof
I hereby claim:
* I am motatoes on github.
* I am motatoes (https://keybase.io/motatoes) on keybase.
* I have a public key ASDmigsAWzs9gaHzX288aWS_XtSCQodImZk0VGy1cx3Towo
To claim this, I am signing this object:
@motatoes
motatoes / ExtractParliament.js
Last active June 27, 2017 23:31
House of lords info scraping (casperJS)
// == This script extracts emails and other data about the UK house of lords from the following url:
// http://www.parliament.uk/mps-lords-and-offices/mps/
var casper = require('casper').create();
var fs = require('fs');
// This array maintains a list of links to each HOL profile
var links = [];
// This array maintains the scraped information and is saved by the end of this script
@motatoes
motatoes / backup.sh
Created November 15, 2014 11:19
Self hosted ghost install automated backup script (based on http://www.allaboutghost.com/how-to-automate-backing-up-ghost/)
#!/bin/bash
GHOST_DATABASE=/var/www/ghost/content/data/ghost.db
BACKUP_DIR=/home/ghost/backup/allghostthemes/
BACKUP_RETENTION_PERIOD=10
LOG_FILE=/var/log/backup-allghostthemes.log
DATE=`date '+%Y/%m/%Y-%m-%d-%H-%S'`
# Make backup directory
mkdir -p $BACKUP_DIR$DATE