Skip to content

Instantly share code, notes, and snippets.

View CarlosRA97's full-sized avatar

Carlos Rivero Aro CarlosRA97

View GitHub Profile

The current kernel/drivers of Fedora 24 do not support the Wifi chip used on my Mac Book Pro. Proprietary Broadcom drivers are packaged and available in the rpmfusion repo.

Verify that your card is a Broadcom using: lspci -vnn -d 14e4:

Sample output:

02:00.0 Network controller [0280]: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)

Install

Install the rpmfusion repo, note only "nonfree" is required, as the Broadcom Driver is proprietry: http://rpmfusion.org/

@juanfal
juanfal / buildMagic.cpp
Last active January 18, 2018 00:00
Using Siamese method fill a Magic Square Matrix
// buildMagic.cpp
// juanfc 2018-01-17
// Using Siamese method fill a Magic Square Matrix,
// odd fixed size.
// We have used a big square matrix, but used
// an extra parameter to restrict to that size
//
// Testing it building magic matrices up to a size
// checking they really are magic and printing them
// https://gist.github.com/6db44e77b75d3aacdfa70bdfb7972ef1
@juanfal
juanfal / 04.pattern.cpp
Created February 7, 2018 11:57
words letters coinciding with a pattern
// 04.pattern.cpp
// juanfc 2018-02-06
//
#include <iostream>
#include <array>
using namespace std;
const int PATLENGTH = 5;
const int NNONREPWORDS = 100;
@CarlosRA97
CarlosRA97 / git.sh
Last active July 7, 2019 18:37
Git client for Docker RPI similar to Alpine Git
#!/bin/bash
docker run -ti --rm -v $1:/git -v $HOME/.ssh:/root/.ssh carlosra97/raspberrypi3-alpine-git ${@:2}
@CuddleBunny
CuddleBunny / CustomService.cs
Last active December 1, 2019 11:16
DotNetCore Console App with DI and ConfigurationBuilder
using Microsoft.Extensions.Configuration;
using System;
namespace CoreConsole {
public interface ICustomService {
}
public class CustomService : ICustomService {
public CustomService(IConfigurationRoot config) {
@kurtsergey
kurtsergey / rn-localization-fetch.js
Last active May 3, 2021 16:12
ReactNative - fetching localization json from Firebase Storage
import _merge from 'lodash/merge';
import i18n from 'react-native-i18n';
import firebase from 'react-native-firebase';
import * as Storage from '../utils/storage'; // just wrapper for AsyncStorage
import { STORAGE_KEY_TRANSLATIONS } from './'; // just key for Storage data, used here to write data, used in main file to read data on app start
@ijt
ijt / http_get.go
Last active August 23, 2021 12:37
Example of using http.Get in go (golang)
package main
import (
"fmt"
"io"
"log"
"net/http"
"os"
)
@Paanini
Paanini / Shorten Links
Last active October 3, 2021 12:49
Google Apps Script to shorten all URLs in a doc using Bit.ly
#!/bin/bash
#
# Properly tunes a Minecraft server to run efficiently under the
# OpenJ9 (https://www.eclipse.org/openj9) JVM.
#
# Licensed under the MIT license.
#
## BEGIN CONFIGURATION
@CarlosRA97
CarlosRA97 / enable_wake_on_lan.sh
Created January 6, 2022 16:34
This is bash script setup the wake on lan functionality on fedora systems using the nmcli command. it was extracted from a forum (https://forums.fedoraforum.org/showthread.php?322977-Making-WoL-persistent)
#!/bin/bash
#
clear
echo
echo
echo "Details of connections:"
echo "=================================================================================="
nmcli con show
CONNECTIONS=()
while IFS= read -r line; do