Skip to content

Instantly share code, notes, and snippets.

View visioncan's full-sized avatar
💭
I may be slow to respond.

VCAN visioncan

💭
I may be slow to respond.
View GitHub Profile
@BigSully
BigSully / start mitmproxy in background programmatically
Last active March 30, 2024 21:33
start mitmproxy in background programmatically
from mitmproxy.options import Options
from mitmproxy.proxy.config import ProxyConfig
from mitmproxy.proxy.server import ProxyServer
from mitmproxy.tools.dump import DumpMaster
import threading
import asyncio
import time
class Addon(object):
@ayyybe
ayyybe / ccdl.command
Last active May 2, 2024 16:08
Adobe Offline Package Builder v0.1.2 (macOS only) --- No longer being maintained.
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@dayne
dayne / 0-WSL-SSH-README.md
Last active September 17, 2023 19:01
WLS-Helpers

Install linux subsystem Ubuntu 18.04

See Microsoft's WSL install guide for windows 10 for details.

Work-in-progress - command line only install:

  • Open Powershell as Administrator and run:
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Open Windows App Store
    • Search for "Ubuntu" and install Ubuntu 18.04

(work in progress - command line install steps):

@nrollr
nrollr / Python.md
Last active June 6, 2023 23:16
Python environments in macOS

Python environments in macOS

The latest version of macOS 10.13.3 has Python 2.7.10 installed by default, yet Python has been available on macOS and previously OS X for quite a while now.

Consult the Apple's Open Source Reference Library, and browse through the various releases of the OS to find out which Python version was included). But what if you have a project which requires Python 3 ?

The following instructions will guide you through the process of:

  • installing Python 3 using Homebrew
  • running multiple Python verions as sandboxed environments
@myshov
myshov / function_invocation.js
Last active January 21, 2024 15:14
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
@mosluce
mosluce / VideoViewController.swift
Last active March 3, 2017 03:01
仿 Youtube 試做
//
// VideoViewController.swift
// SideMenuCALayerDemo
//
// Created by 默司 on 2017/3/1.
// Copyright © 2017年 默司. All rights reserved.
//
import UIKit
import AVFoundation
@peterdemartini
peterdemartini / command.sh
Last active April 28, 2024 02:42
Exclude node_modules in timemachine
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion
@mackuba
mackuba / wwdc16.md
Last active March 5, 2023 21:28
New stuff from WWDC 2016

Following the tradition from last year, here's my complete list of all interesting features and updates I could find in Apple's OSes, SDKs and developer tools that were announced at this year's WWDC. This is based on the keynotes, the "What's New In ..." presentations and some others, Apple's release notes, and blog posts and tweets that I came across in the last few weeks.

If for some reason you haven't watched the talks yet, I really recommend watching at least the "State of the Union" and the "What's New In" intros for the platforms you're interested in. The unofficial WWDC Mac app is great way to download the videos and keep track of what you've already watched.

If you're interested, here are my WWDC 2015 notes (might be useful if you're planning to drop support for iOS 8 now and start using some iOS 9 APIs).


OSX → macOS 10.12 Sierra

@coodoo
coodoo / gist:59891964b06a603e2dc8
Created September 3, 2015 00:16
react isomorphic 原理
- 我想要挑戰isomorphic,但目前好像比較少redux配isomorphic又配上webpack的方案
- 這個範例可看,最近全部改寫過
- https://github.com/coodoo/react-redux-isomorphic-example
- 注意下面幾點
- js/bootClient.js 與 js/bootServer.js
- bootServer.js 負責做 server-render
@mackuba
mackuba / wwdc15.md
Last active August 6, 2022 17:28
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.

OS X El Capitan

http://www.apple.com/osx/elcapitan-preview/

  • split view - two apps side by side on full screen