Use the bitwise OR operator (|) to set a bit.
number |= 1 << x;
That will set bit x.
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
// Converts degrees to radians. | |
#define degreesToRadians(angleDegrees) (angleDegrees * M_PI / 180.0) | |
// Converts radians to degrees. | |
#define radiansToDegrees(angleRadians) (angleRadians * 180.0 / M_PI) |
project_file/History/* | |
project_file/__Previews/* | |
project_file/Project Logs for project_file/* |
language: c | |
env: | |
- BD=esp8266:esp8266:nodemcuv2:CpuFrequency=80,FlashSize=4M3M | |
before_install: | |
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16" | |
- sleep 3 | |
- export DISPLAY=:1.0 | |
- wget http://downloads.arduino.cc/arduino-1.8.2-linux64.tar.xz | |
- tar xf arduino-1.8.2-linux64.tar.xz | |
- sudo mv arduino-1.8.2 /usr/local/share/arduino |
###Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)
More details - http://blog.gbaman.info/?p=791
For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt
file dtoverlay=dwc2
on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh
in the SD card as well. By default SSH is
#!/bin/bash | |
#python2 path | |
py2=v2/v.txt | |
#C:/Python27/python.exe | |
#python3 path | |
py3=v3/v.txt | |
#C:/Users/vojislav/AppData/Local/Programs/Python/Python38-32/python.exe | |
VERSION=$1 |
#!/bin/bash | |
#change the dots with your python 2 and 3 paths and leave .exe file names as they are, you can find them in windows env variables | |
#python2 path | |
py2=../python.exe | |
py2_n=../python2.exe | |
#python3 path | |
py3=../python.exe | |
py3_n=../python3.exe |