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 / 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 <[email protected]>
# 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
@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 / 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 / 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 / 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 / .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 / 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": [

Keybase proof

I hereby claim:

  • I am cabeda on github.
  • I am cabeda (https://keybase.io/cabeda) on keybase.
  • I have a public key ASDNDauw0vzWmlyjbot1j6lgfaes9c1iRpJ6zkoNMjU50go

To claim this, I am signing this object:

@Cabeda
Cabeda / query.sql
Last active June 18, 2019 09:07
Check if two tables have the same columns
--Check different columns
select znew.column_name as newcol,
zold.column_name as oldcol
from (
select column_name
from information_schema.columns
where table_schema = 'zendesk'
and table_name = '_groups') zold
full join
(select column_name
@Cabeda
Cabeda / osx-setup.sh
Last active September 9, 2021 13:56 — forked from somebox/osx-setup.sh
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc).
#!/bin/bash
# A script to set up a new mac. Uses bash, homebrew, etc.
# Settings
node_version="14.9.0"
ruby_versions="2.7.0"
python="3.8.1"
ruby_default="2.7.0"