{How-TO}host web on github - General Topics

So you want to launch a simple website but don’t want to have to go through the dull process of setting up yet another hosting package.Or you dont have money to buy a hosting package as they are often expensive and limited if you dont have enough money. There is an easier solution. If you just want to launch a simple static website you can use GitHub Pages to host your site for free.
Lets get started.
GUIDE CONTENTS:
HTML:
***How to start.(Requirments,How to make a repository,
How to make a proper branch,
How to prepare your web,
How to upload.
***Using a custom domain.
***Some final thoughts
***Help users(help each other....))
Needed:
PHP:
***A github account
***Some basic git knowladge
***A domain
***Knowladge about forwarding
Thats it.
Step 1:
All webpages containt some basic stuff.Your webpage contains for example:
PHP:
***index.html (your main page)
***example.html (some other page)
***assets (a folder containing your assets)
***css (cascading style sheet){your website style}
***img(web images duh)
***js(some simple or not that simple javascript files)
So all this needs to be uploaded somewhere.You ask me where ?Well we are gonna host on github ,right? Then lets upload it there.
Go to your github account.And go to the repositories tab.Then click new.And name your repository whatever you want.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Step 1 is complete.Congratulations lets move on.
Step 2 is all about a little terminal play.
Step 2:
Now open up terminal (command prompt on Windows) and make sure that you have a copy of your GitHub repo on your computer. Once you got your local copy, move into the project folder using the cd command.
How are you going to that you can see in the following example.
PHP:
// Retrieve a copy of your GitHub repo.
git clone https://github.com/user/repository.git
// Move into that directory.
cd repository
Creating an Orphan Branch
Now you need to create a new orphan branch within your repo that will hold all of your website files.
This new branch should be called gh-pages.
PHP:
git checkout --orphan gh-pages
If you already had files in the master branch of your GitHub repo you now need to delete these from the new gh-pages branch. To do this you can use the following command:
PHP:
git rm -rf .
Adding Your Website Files
Now that your repo has been properly setup it’s time to add all of the HTML, CSS and JavaScript files that make up your website. Once you have added these to your repo you need to commit the changes. To do this you can use the following command.
PHP:
git commit -a -m "Adding pages"
Note: The -a flag is shorthand for git add .
Congratulations step 2 is now complete.
Step 3:
Pushing Your Changes to GitHub
Okay so you’ve got all your files where they need to be. The only thing left to do now is to push the new gh-pages branch up to GitHub. You do this using the git push command.
PHP:
git push origin gh-pages
That’s it! Your website should now be available at http://username.github.io/repository/.
​

Reserved

Reserved just in case we miss space

Related

[HOWTO] Setup Linux shell on Windows | Allows Windows to run Linux commands!

Want to do something like this on your Windows OS?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Fear not, in this tutorial, you will learn on how to install a linux shell on your Windows OS!
To install a linux shell on Windows, there's a few solutions solutions that I usually prefer:
Msysgit
Cygwin
Powershell
In this tutorial, Msysgit is the program that will be installed as apart from giving you a linux shell, it gives you access to do git related things(clone a repo, fork repo) which is a very good plus
So, here's it, we'll install a linux shell on our Windows OS and have fun with it later on
Msysgit Installation:
1. Click here and download the latest version of msysgit(The latest version of the time of writing is 1.8.0 http://code.google.com/p/msysgit/downloads/detail?name=Git-1.8.0-preview20121022.exe&can=2&q=)
2. Open the installer and you will see something similar to this and click Next to continue
3. After that, you will be shown the gpl license as per shown below and click Next to continue
4. You will be prompted the location to install msysgit at. Click Next to continue
5. You will be prompted for additional settings, click Next to continue.
6. You will be prompted for the startup menu, click Next to continue.
7. You will be prompted for the path environment, select Use Git Bash only and click Next to continue.
8. You will be prompted for the line ending adjustment. Select Checkout as-is, commit Unix-style line endings and click Next to continue.
9. The installer will install the required files.
10. The installation has finished! Untick ReleaseNotes.rtf and click Finish to end the installation.
How to use:
1. Right click on an empty space at your desktop and click Git Bash.
2. Type your linux "hackish" commands!
The command that is used in the first screen shot is ls -la(directory listing with the file permissions of each file).
There's a lot of commands that you can play with, like echo, cat, uname, which, grep, sed, and many many more!
NOTE #1: For the best compatibility, cygwin would be preferred as it has a very complete set of linux commands built-in but Msysgit is less hassle to setup and it allows you to mingle around with Git once the setup is done which is a very good thing
NOTE #2: Msysgit is not preferred as a shell to create anything advanced like roms or kernels as the features that are available at mysysgit is rather limited(but it is enough for most users like us ).
There will be more tutorials which are related to Git and Linux will be made in the future, so read up fast and stay tuned for more contents! :fingers-crossed:

[PROJECT][PORT] Go4Droid v1 | write,run,compile Go Lanuage codes on your phone !

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
about Go Language
Go, also called golang, is a programming language initially developed at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.It is a statically-typed language with syntax loosely derived from that of C, adding automatic memory management, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library. Beyond that broad category, Go is defined by:
-A syntax and environment adopting patterns more common in dynamic languages:
Concise variable declaration and initialization through type inference (x*:= 0 not int x = 0.
-Fast compilation times.
-Remote package management (go get).and online package documentation
-Distinctive approaches to particular problems.
-Built-in concurrency primitives: light-weight processes (goroutines), channels, and the select statement.
-An interface system in place of virtual inheritance, and type embedding instead of non-virtual inheritance.
-A toolchain that, by default, produces statically linked native binaries without external dependencies.
-A desire to keep the language specification simple enough to hold in a programmer's head,in part by omitting features common to similar languages:
no type inheritance
no method or operator overloading
no circular dependencies among packages
no pointer arithmetic
no assertions
no generic programming
about Go4Droid
Although Go is a Google project ,it has not option for building for Android !Also It has there is no way to use it on your Android device and do compiling(instead of cross-compiling) (beacuase it does not building for external host and target).All this reasons made me think about this project and finally I ported a complete set of Go compiler, Go linker, Go Packages and also net support !.
You can easily write go codes , compile them, run them and install them. There are lots of packages which let you write amazing programs.
prequisites
minimum :
- Root privilege
- ARMv7 (vfpv3) SoC.
- Android +1.6 (linux kernel +2.6)
- 80 MB free space in system partition
- CWM/TWRP installed
suggested :
- Root privilege
- ARMv7 (vfpv3) + NEON SoC.
- Android +4.2 (linux kernel +3.4)
-150 MB free space in system partition
- CWM/TWRP installed
installation
- Download zip file.
- Install CWM/TWRP.
- Ready !
usage
This thread is not supposed to be a GoLang tutorial , however I explain main options.
* Do not forget to get root before anything :
Code:
su
1- Use this command to run a .go file (file = helloworld.go):
Code:
go run helloworld.go
2- Use this command to compile a .go file and generate an executable :
Code:
go build helloworld.go
./helloworld
3- Use this command to compile & install a code file:
Code:
go install helloworld.go
helloworld
example
Code:
package main
import "fmt"
func main() {
fmt.Println("Hello, World")
}
download
Go4Droid v1
*intial release
help the project
Every single build takes +30 minutes on my Android device so it would be difficult to manage this project. You can help me by donating me a VPS/Dedicated server then I will be able to update and manage this project faster and better.
reserved
Well done man! I'm trying it now
Will report results soon
I 've spend +10 hours on this project for 0 people using it !
That's great, man. You beat Google to it!
This looks interesting, but without access to the UI or Android APIs, we're pretty limited, right?
raveur said:
That's great, man. You beat Google to it!
This looks interesting, but without access to the UI or Android APIs, we're pretty limited, right?
Click to expand...
Click to collapse
There is no Android JNI support yet (and unfortunately no plan to do it). However it has a great builtin API with net,archive,fs,os,image,... support.
Great project,
Thanks for that.
Still no NDK support for Go?
myfreeweb said:
Still no NDK support for Go?
Click to expand...
Click to collapse
Go has no Android JNI support thus there is no Go support in NDK .

[GUIDE][HOW-TO] Add Koush SuperUser In Settings Of AOSP Or Any Source Built Rom

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is for people who build AOSP or any roms from source for general public or for personal use. Koushik Dutta has given quite a good explanation here but some more things are needed to get it fully working. You should know what you are doing before you read ahead. I am not responsible if you mess up your device or any of your personal belongings
Click to expand...
Click to collapse
​
This guide will focus on Nexus 5 but the same procedure should work on Nexus 4, Nexus 7 (2012 & 2013) or any other device with little or no modifications.
Prerequisite:
Knowledge about building roms from source
knowledge about cherry-picking commits and resolving the conflicts
basic knowledge about device trees
A logical and working brain
Click to expand...
Click to collapse
Step 1: Add the required packages into your source:
You need to add the Superuser related repos from cyanogenmod into your rom source. This can be done using a local manifest. Make a local manifest by any name say su.xml and place it in .repo/local_manifests/su.xml. If the "local_manifests" folder doesn't exists in .repo then make one. Copy paste the following lines in su.xml
Code:
Step 2: Cherry-pick commits
There are many commits to refer. I would link some to you. You can cherry-pick, for example,this or this. You can refer any of such commits. Cherry-pick is to be done in packages/apps/Settings. There might be conflicts in Android.mk & proguard.flags. Just compare the files from the ones in the above linked commits and fix them.
Step 3 : Add some required flags to device make file
To make Superuser to go under Settings, the most important flag needed is this :
Code:
SUPERUSER_EMBEDDED := true
Without this, superuser won't get embedded into Settings.apk. You can add this flag in any ".mk" file. I have added it under device/lge/hammerhead/device.mk. Some build.prop lines are also needed to get root working. Also you need to make the Superuser and su binary packages to be built. All the lines needed are summarized as follows:
Code:
# SU Support
SUPERUSER_EMBEDDED := true
PRODUCT_PACKAGES += \
Superuser \
su
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.root_access=3
# Enable ADB authentication
PRODUCT_PROPERTY_OVERRIDES += \
ro.adb.secure=1
Add all of them on the same location device/lge/hammerhead/device.mk.
Step 4[MOST IMPORTANT] : Import init.superuser.rc in init.rc or similar file.
People do everything properly upto step 3 but they never get superuser to work properly. When you try opening any root app, ADB gives the following error :
Code:
D/su ( 2529): su invoked.
D/su ( 2529): starting daemon client 10019 10019
E/su ( 2529): connect failed with 2: No such file or directory
su daemon is started by init.superuser.rc. You need to import it in init.rc or in this case init.hammerhead.rc or any similar init file like this :
Code:
import init.hammerhead.usb.rc
import init.superuser.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
chown system system /sys/kernel/debug/kgsl/proc
If you don't do this, system won't know that a file "init.superuser.rc" even exists. Hence, the daemon fails, failing root access eventually
DONE!!!! Just build the rom as you normally do and you have # Superuser under Settings. I hope it was clear enough. I have tried to add everything I recollect but if you find anything missing then please let me know. Thank you!!!! And enjoy coding​
Reserved
One more
Wouldn't this be better to add to a general android hacking section as it could also apply to more devices?
Somcom3X said:
Wouldn't this be better to add to a general android hacking section as it could also apply to more devices?
Click to expand...
Click to collapse
Yeah that's right. I kept nexus 5 as example so i added it up here. You can report it to get to general section. I am not near the pc atm
Looks like it was moved

SideQuest - Sideloading made easy! for Oculus Go and Quest.

SideQuest is designed to simplify sideloading apps onto your standalone android based headset. It should include everything you need to get started. When you first open the app it is best to open the setup screen and follow the instructions on screen to get setup.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It is important to follow the instructions in the setup screen before you start - particularily installing the OpenStore Launcher app to be able to find the apps on your device once they are installed.
SideQuest Features
Automatic download of ADB platform-tools for your platform - win/mac/linux.
Setup instructions for enablding developer mode on your device.
On device launcher app to be able to open the apps once installed.
Drag and drop support for installing arbitrary apps.
Repository seeding via sources.txt file to preload your own repos for distribution.
Add custom fdroid based repositories to get more apps.
Setup
When you first launch SideQuest it will download the repositories and also download the ADB tools. Once this is done you should go to the Setup menu option and follow through the one time setup to get your device ready to install apps.
If you have any problems you can hit the debugger icon to capture any errors - these will really help to find and fix bugs.
Apps
I will be adding more apps to the repos and I will be notifying of repo updates on my discord server - you can then manually update the repos in the repos section to get the new app listings.
Downloads
github.com /the-expanse /SideQuest /releases
shakamone said:
SideQuest is designed to simplify sideloading apps onto your standalone android based headset. It should include everything you need to get started. When you first open the app it is best to open the setup screen and follow the instructions on screen to get setup.
It is important to follow the instructions in the setup screen before you start - particularily installing the OpenStore Launcher app to be able to find the apps on your device once they are installed.
SideQuest Features
Automatic download of ADB platform-tools for your platform - win/mac/linux.
Setup instructions for enablding developer mode on your device.
On device launcher app to be able to open the apps once installed.
Drag and drop support for installing arbitrary apps.
Repository seeding via sources.txt file to preload your own repos for distribution.
Add custom fdroid based repositories to get more apps.
Setup
When you first launch SideQuest it will download the repositories and also download the ADB tools. Once this is done you should go to the Setup menu option and follow through the one time setup to get your device ready to install apps.
If you have any problems you can hit the debugger icon to capture any errors - these will really help to find and fix bugs.
Apps
I will be adding more apps to the repos and I will be notifying of repo updates on my discord server - you can then manually update the repos in the repos section to get the new app listings.
Click to expand...
Click to collapse
Excellent tool worked for me 100% . Thank you for your work.
This tool looks incredible. Just need the money now to get my Oculus Quest? Thank you man!
when I did the update on my side quest the apps to the game stop working can anyone help

Android Studio Stuck on Loading Project

I was working in Android Studio and accidentally locked my Android Folder containing the Sdk, I re gave myself the permissions and unlocked it but when I try to reopen my android project it stays stuck on loading project.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I have tried restarting my computer(linux) and running ./studio.sh but it is still not loading.
I am also seeing in the terminal:
2021-03-19 12:48:57,346 [ 56749] WARN - Container.ComponentManagerImpl - Do not use constructor injection (requestorClass=com.android.tools.idea.apk.issues.SetupIssueReporter)
first, glad to see you use programming on linux, i encourage you continue using it and learn it
that "WARN", is normal when starting studio from command line.
check in ~/HOME/AndroidStudioProjects directory, (if you allowed android studio to install location for projects in ~/HOME/AndroidStudioProjects, and in ~/HOME directory check if you have "Android" directory, there is located Sdk tools.
check permissions for directories, just check this website , cd (open directory, terminal command) to ~/HOME/AndroidStudioProjects;
Code:
~/HOME/AndroidStudioProjects
, and check permissions via
Code:
ls -l
, or
Code:
cd AndroidStudioProjects
to get deeper into, to list project directories you have, and check their permissions, they need to have write, and read permissions for owner at least
And replace ~/HOME, with your name you use in linux, if command don't work, so not to get confused there
indestructible master said:
first, glad to see you use programming on linux, i encourage you continue using it and learn it
that "WARN", is normal when starting studio from command line.
check in ~/HOME/AndroidStudioProjects directory, (if you allowed android studio to install location for projects in ~/HOME/AndroidStudioProjects, and in ~/HOME directory check if you have "Android" directory, there is located Sdk tools.
check permissions for directories, just check this website , cd (open directory, terminal command) to ~/HOME/AndroidStudioProjects;
Code:
~/HOME/AndroidStudioProjects
, and check permissions via
Code:
ls -l
, or
Code:
cd AndroidStudioProjects
to get deeper into, to list project directories you have, and check their permissions, they need to have write, and read permissions for owner at least
And replace ~/HOME, with your name you use in linux, if command don't work, so not to get confused there
Click to expand...
Click to collapse
Thanks so much for you help and encouragement for programming with linux!
I checked the permissions of the folder and am seeing:
Code:
drwxrwxr-x
Which I think means that I have permissions for this folder.
yjay18 said:
I was working in Android Studio and accidentally locked my Android Folder containing the Sdk, I re gave myself the permissions and unlocked it but when I try to reopen my android project it stays stuck on loading project.
View attachment 5254367
I have tried restarting my computer(linux) and running ./studio.sh but it is still not loading.
I am also seeing in the terminal:
2021-03-19 12:48:57,346 [ 56749] WARN - Container.ComponentManagerImpl - Do not use constructor injection (requestorClass=com.android.tools.idea.apk.issues.SetupIssueReporter)
Click to expand...
Click to collapse
I keep reading a lot of posts when I first get into trouble. This is how I once reached this website ( https://kodlogs.net/329/android-studio-stuck-on-installing-apk ) and got the desired solution. You can read this post as well as visit here. I think it will be very useful for you

Categories

Resources