Skip to content

Instantly share code, notes, and snippets.

View gowrav's full-sized avatar
🦸‍♂️

Gowrav L gowrav

🦸‍♂️
View GitHub Profile
/* Drop all non-system stored procs */
DECLARE @name VARCHAR(128)
DECLARE @SQL VARCHAR(254)
SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 ORDER BY [name])
WHILE @name is not null
BEGIN
SELECT @SQL = 'DROP PROCEDURE [dbo].[' + RTRIM(@name) +']'
EXEC (@SQL)
@gowrav
gowrav / pi_qemu.sh
Created April 24, 2017 20:41 — forked from JasonGhent/pi_qemu.sh
OSX raspberry pi emulation via QEMU. v2 attempt @ https://gist.github.com/JasonGhent/922f38f57c8cb77b10f3
# pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
# expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu
# tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks
# OSX terminal
brew install qemu
# kernel-qemu is a linux kernel compiled with ARM1176 support.
# learn more here: http://xecdesign.com/compiling-a-kernel/
curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu
curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest
@gowrav
gowrav / qemu_osx_rpi_raspbian_jessie.sh
Created April 25, 2017 05:28 — forked from hfreire/qemu_osx_rpi_raspbian_jessie.sh
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@gowrav
gowrav / create-hotspot.md
Last active December 29, 2024 00:33 — forked from narate/create-hotspot.md
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlx7cdd9046ee19 con-name AiRpaperHostspot autoconnect yes ssid AiRpaperHostspot
#Connection 'AiRpaperHostspot' (81bd8ff0-1473-4bda-b00d-5759cd1c3a27) successfully added.
nmcli con modify AiRpaperHostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify AiRpaperHostspot wifi-sec.key-mgmt none
@gowrav
gowrav / hostapd.conf
Created August 29, 2018 05:25 — forked from nickpegg/hostapd.conf
My hostapd config
# Set up some logging. VERY useful to see why things aren't working.
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
# Which interface to use and which bridge to join
interface=wlan0
bridge=br0
@gowrav
gowrav / bt_speaker-raspberry_pi-zero_w.md
Created September 5, 2018 14:22 — forked from actuino/bt_speaker-raspberry_pi-zero_w.md
Setting up a Bluetooth Speaker from the command line on a raspberry Pi Zero W

The setup of a bluetooth speaker on a Pi Zero W is pretty touchy.

Please get in touch via Twitter @actuino or http://www.actuino.fr/ if you've got comments or improvements to this quick draft.

First checks

  • Use a solid power source
  • check the speaker works on another hardware (android phone f.i.)
  • make sure you've updated your Raspbian, install and run rpi-update just in case.