The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.
| PowerShell -Command "Set-ExecutionPolicy Unrestricted" >> "%TEMP%\StartupLog.txt" 2>&1 | |
| PowerShell C:\Users\YOUR_USERNAME\Desktop\hotspot.ps1 >> "%TEMP%\StartupLog.txt" 2>&1 |
| import tqdm | |
| import json | |
| # states: | |
| # neutral: 0 | |
| # player1: 1, 2, 3 (have 2 of each) | |
| # player2: -1, -2, -3 (have 2 of each) | |
| # board: 3x3 => 9 long tuple (board[i][j] = tuple[i*3 + j]) | |
| # Rotations |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| File name: download_apk.py | |
| Author: Dawand Sulaiman | |
| Download APK files from Google Play Store with Python | |
| This script scraps https://apkpure.com to get the apk download link | |
| Make sure you have BeautifulSoup and urllib libraries | |
| """ |
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.
| #!/usr/bin/env perl | |
| use v5.10; | |
| use warnings FATAL => "all"; | |
| use Dancer; | |
| use URI::Escape qw(uri_escape_utf8); | |
| # This is all the search engine does | |
| get '/search' => sub { | |
| given (param("q")) { | |
| when (/^(?:!(?:ducky)?\s+|\\)(.*)/) { redirect 'http://www.google.com/search?btnI=1&q=' . uri_escape_utf8 $1 } |
| (import '(java.awt Point Graphics Frame) '(java.awt.geom AffineTransform)) | |
| (def minpoint (doto (Point.) (.setLocation 0 0))) | |
| (def maxpoint (doto (Point.) (.setLocation 1000 1000))) | |
| (defn draw [pts #^Frame w] | |
| (doseq [[x y] pts] (.fillRect (.getGraphics w) x y 1 1))) | |
| (let [w (doto (Frame. "Bitmap") (.setSize 600 700) (.setVisible true))] ()) |