Skip to content

Instantly share code, notes, and snippets.

View Cabeda's full-sized avatar
:octocat:

José Cabeda Cabeda

:octocat:
View GitHub Profile
@Cabeda
Cabeda / template-quiz.json
Last active March 13, 2019 14:19
Template Quiz for Quizzer
{
"Title": "Quiz test",
"Phases": [
{
"Phase": "Easy",
"NumberOfQuestions": 3,
"Questions": [
{
"Question": "In what year was 1984 originally published?",
"Answers": [
@Cabeda
Cabeda / .hyper.js
Last active December 18, 2018 18:22
Hyper settings
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@Cabeda
Cabeda / check-connection.ps1
Created November 5, 2018 12:00
Powershell script to continously check for an HTTP connection
param (
[string]$server = "www.google.com"
)
"Checking connection for " + $server
$hasConnection = $false
while ($hasConnection -eq $false) {
$result = Test-NetConnection $server
@Cabeda
Cabeda / IslastCompleteWeek.txt
Created August 22, 2018 07:25
Column to detect if a date is in the last completed week relatively to today
IslastCompleteWeek =
IF (
WEEKNUM (
'Calendar'[Date],
2
) = IF (
WEEKNUM (
TODAY (),
2
) = 1,
@Cabeda
Cabeda / Create Date Table
Created April 18, 2018 18:13
Creates a sql date table for a specified interval (Portuguese column names)
GO
CREATE TABLE [dbo].[DimData]
(
DateID int not null PRIMARY KEY,
Ano int not null,
Semestre int not null,
Quadrimestre int not null,
Mes int not null,
Semana int not null,
DiadaSemana int not null,
@Cabeda
Cabeda / DNS Switcher.ps1
Created April 7, 2018 18:38
Powershell Script to change the DNS directory
#Functions
function CheckAdminRights() {
# Check if it has admin rights
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "You do not have Administrator rights to run this script!`nPlease re-run this script as an Administrator!"
Pause
Break
}
@Cabeda
Cabeda / reclaimWindows10.ps1
Created January 8, 2017 14:34 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1