Skip to content

Instantly share code, notes, and snippets.

View qreator66's full-sized avatar

Pisit Phudphong qreator66

View GitHub Profile
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@qreator66
qreator66 / route.sh
Last active August 17, 2023 13:32
VPN Routing Manager
#!/bin/bash
COLOR_INFO='\033[0;34m'
COLOR_SUC='\033[0;32m'
COLOR_ERR='\033[0;35m'
NOCOLOR='\033[0m'
is_root() {
return $(id -u)
}
@qreator66
qreator66 / README.md
Created July 22, 2017 10:06
How to Bootcamp / Dual Boot Windows 10 on a mid-2011 iMac using USB

How to Install / Bootcamp Windows 10 on a mid-2011 iMac using USB

Apple has released support for bootcamping Windows 10, but only on 2012 Macs and later. Despite not being supported. it is possible to install Windows 10 on earlier iMacs and it seems to run quite well.

IMPORTANT: Unplug all external and physical hard drives (where possible) that you won't be installing to to avoid accidentally erasing them. Also make note of which drives and partitions remain (e.g. System and Storage hard drives), and be super careful to not erase the wrong one.

RECOVERY: If you nuke your machine, restore your time machine backup. Instructions here.

Requirements

@qreator66
qreator66 / Appfile
Created April 21, 2017 07:37 — forked from pjechris/Appfile
fastlane
# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/docs/Appfile.md
app_identifier ENV["APP_IDENTIFIER"] # The bundle identifier of your app
# You will have to set APP_IDENTIFIER into your .env files
apple_id "" # Your Apple email address
team_id "" # Developer Portal Team ID
@qreator66
qreator66 / laravel-subdirectory.conf
Created March 22, 2017 13:26 — forked from tsolar/laravel-subdirectory.conf
Laravel in subdirectory nginx example
server {
client_body_in_file_only clean;
client_body_buffer_size 32K;
client_max_body_size 300M;
sendfile on;
send_timeout 300s;
# Port that the web server will listen on.
#listen 80;
@qreator66
qreator66 / cloudflare_update.script
Created March 13, 2017 05:14 — forked from kiler129/cloudflare_update.script
Automatic script for Mikrotik RouterOS updating record on CloudFlare.
#########################################################################
# ================================================== #
# $ Mikrotik RouterOS update script for CloudFlare $ #
# ================================================== #
# #
# - You need a CloudFlare account & api key (look under settings), #
# a zone and A record in it #
# - All variables in first section are obvious, except CFid, #
# To obtain CFid use following command in any unix shell: #
# curl https://www.cloudflare.com/api_json.html -d 'a=rec_load_all' -d 'tkn=YOUR_API_KEY' -d 'email=email@example.com' -d 'z=domain.com'|python -mjson.tool
@qreator66
qreator66 / Podfile
Created September 8, 2016 06:33 — forked from azimin/Podfile
Autosign podfile
developer_info = {
"DevelopmentTeam" => "5-------S4",
"DevelopmentTeamName" => "Alexander Zimin"
}
post_install do |installer|
path = installer.pods_project.path
pbxproj_path = path + 'project.pbxproj'
unless File.exist?(pbxproj_path)

This is for Posterity: Googling issues with Apple iOS 9 Mikrotik and L2TP VPN lead me to this Post. I had many troubles and finally got it to work. I will post my commands below to hopefully save others some headache. :D

this assumes some default configuration on the router: local subnet 192.168.1.0/24 router address 192.168.1.1 dhcp pool 192.168.1.100 - 192.168.1.200

@qreator66
qreator66 / Main.storyboard
Created March 20, 2016 15:39 — forked from SwiftArchitect/Main.storyboard
Autolayout & Columns. See the full article at http://swiftarchitect.com/autolayout-columns/, and the StackOverflow question at http://stackoverflow.com/questions/31658526/using-autolayout-to-stack-within-two-columns-of-varying-heights/31804168#31804168. Copyright (c) 2015 Xavier Schott, MIT License
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">