This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# LICENSE: MIT | |
# | |
# Copyright (C) 2014 Samuel Stauffer | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to | |
# deal in the Software without restriction, including without limitation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# First argument: the ID of the Github Gist to clone from | |
GIST_ID=${1} | |
# Clone the gist in our bin directory | |
cd ~/bin | |
git clone [email protected]:/${GIST_ID}.git | |
# symlink all scripts for global execution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For usage with https://gist.github.com/romgrk/0ba7a864a4e6c76eefd3 | |
# drop-down-terminal gnome extension configuration | |
# F11/A-F11/C-F11 size-down/medium/up the terminal | |
# F12 + [0-9] sets background opacity | |
# F11 & M-F11 = sizeup/sizedown | |
function _dropdown_h_normal () { | |
dropdownterminal h 50% | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gmailAutoarchive() { | |
var delayDays = 2; // will only impact emails more than 48h old | |
var maxDate = new Date(); | |
maxDate.setDate(maxDate.getDate()-delayDays); // what was the date at that time? | |
// Get all the threads labelled 'autoarchive' | |
var label = GmailApp.getUserLabelByName("autoarchive"); | |
var threads = label.getThreads(0, 400); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Update SOA records for zones having a certain IP in the content */ | |
UPDATE records | |
SET `content` = 'ns1.connexeon.com. domains.connexeon.com. 2017040701 1200 400 1209600 300' | |
WHERE `id` IN | |
(SELECT `id` | |
FROM records_copy | |
WHERE `type`='SOA' | |
AND `domain_id` IN | |
(SELECT DISTINCT `domain_id` | |
FROM records_copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-VpnConnection -Name "VPN Connexeon" -ServerAddress "vpn.connexeon.com" -TunnelType Pptp -EncryptionLevel Required -AuthenticationMethod MSChapv2 -AllUserConnection -RememberCredential -PassThru -UseWinlogonCredential | |
Set-VpnConnection "VPN Connexeon" -AllUserConnection -SplitTunneling $True | |
Add-VpnConnectionRoute -ConnectionName "VPN Connexeon" -DestinationPrefix 10.0.0.0/12 -PassThru | |
Add-VpnConnectionRoute -ConnectionName "VPN Connexeon" -DestinationPrefix 10.111.0.0/16 -PassThru | |
Add-VpnConnectionRoute -ConnectionName "VPN Connexeon" -DestinationPrefix 10.50.0.0/16 -PassThru |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System: Host: nuci7-mint18 Kernel: 4.10.0-35-generic x86_64 (64 bit gcc: 5.4.0) | |
Desktop: Cinnamon 3.4.6 (Gtk 3.18.9-1ubuntu3.3) dm: lightdm Distro: Linux Mint 18.2 Sonya | |
Machine: Mobo: Intel model: NUC7i7BNB v: J31145-303 | |
Bios: Intel v: BNKBL357.86A.0052.2017.0918.1346 date: 09/18/2017 | |
CPU: Dual core Intel Core i7-7567U (-HT-MCP-) cache: 4096 KB | |
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 14016 | |
clock speeds: min/max: 400/4000 MHz 1: 3831 MHz 2: 3722 MHz 3: 3770 MHz 4: 3789 MHz | |
Graphics: Card: Intel Device 5927 bus-ID: 00:02.0 chip-ID: 8086:5927 | |
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) | |
Resolution: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# Upgrade script for RPi (packages + firmware) | |
# | |
# Just run this onliner to launch updates, cleanup & prompt to reboot if required | |
# bash <(curl -sSL https://connexeon.link/upgrade-rpi) | |
function needs_reboot { | |
if [ -f /var/run/reboot-required ]; then | |
read -p "Restart needed. Reboot? (y/N) " answer; |
OlderNewer