Skip to content

Instantly share code, notes, and snippets.

View ysr23's full-sized avatar

ysr23 ysr23

  • Manchester, England
View GitHub Profile
@ysr23
ysr23 / pi zero W ap setup.md
Last active September 18, 2024 14:50
Raspberry Pi Zero W Access Point (ap) setup

These are my own personal notes on how i setup a Pi Zero W as an access points it is a blatant copy of this: https://gist.github.com/tcg/0c1d32770fcf6a0acf448b7358c5d059 but is just missing a couple of things from: http://imti.co/post/145442415333/raspberry-pi-3-wifi-station-ap and like tcg, this is not intended as a guide but notes as i will invariably have to rebuild this sometime and i have broken biscuits for brains.

1. making the pi zero accesible from a computer

this is really just the same info as here https://gist.github.com/gbaman/975e2db164b3ca2b51ae11e45e8fd40a

  • flash raspbian lite to sd card
  • unplug and replug sd card adapter if necessary to see 'boot' drive
  • edit cmdline.txt add: modules-load=dwc2,g_ether after the word rootwait
  • edit config.txt and add dtoverlay=dwc2 to the end of the file
  • create a blank file called ssh
@ysr23
ysr23 / tleo.sql
Last active November 16, 2016 11:25
SELECT t1.child_pid as Lev0
, e1.type as Lev0Type
, t1.parent_pid AS lev1
, tt2.value AS lev1_Name
, e2.type as Lev1Type
, t2.parent_pid as lev2
, tt3.value AS lev2_Name
, e3.type as Lev2Type
, t3.parent_pid as lev3
, tt4.value AS lev3_Name
response_unified.each {|r|
r = Hash[r.map {|k, v| [mappings[k], v] }]
}
puts response_unified
@ysr23
ysr23 / gist:4118156
Created November 20, 2012 14:08
Problem splitting a file
def self.process_tweet(reply, requestlink)  
   @requestlink = requestlink 
   qry = reply.downcase.split

using a breakpoint to inspect 'reply' in my code - but cannot figure out why it is not splitting?

[1] pry(GuideSearch)> p reply                                                                                        
 "@twellyme film"                                                                                                     

=> "@twellyme film"

[master (root-commit) 4043717] first commit
2 files changed, 4 insertions(+), 0 deletions(-)
create mode 100644 goodbye.sh
create mode 100644 hello.sh
[toast@nugget hello 03:08 PM]$
$ git commit
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
#
# Initial commit
#
# Changes to be committed:
$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: goodbye.sh
# new file: hello.sh
$ git add hello.sh
$ git add goodbye.sh
$ vim hello.sh
echo "Hello, World!"
$ vim goodbye.sh
echo "Goodbye"
echo "cruel"
echo "world"
$ git init
Initialized empty Git repository in /home/toast/rails/hello/.git/
$