Skip to content

Instantly share code, notes, and snippets.

View phpmaple's full-sized avatar
🎯
Focusing

KooFrank phpmaple

🎯
Focusing
View GitHub Profile
@Brandawg93
Brandawg93 / google_login.ts
Last active July 23, 2023 03:08
Login to Google Account via Puppeteer
import puppeteer from 'puppeteer-extra';
import pluginStealth from 'puppeteer-extra-plugin-stealth'; // Use v2.4.5 instead of latest
import * as readline from 'readline';
puppeteer.use(pluginStealth());
// Use '-h' arg for headful login.
const headless = !process.argv.includes('-h');
// Prompt user for email and password.
@bbqtd
bbqtd / macos-tmux-256color.md
Last active May 20, 2024 04:07
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active May 20, 2024 10:49
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@ResoDev
ResoDev / dart.json
Created July 14, 2019 16:32
Put this to File -> Preferences -> User Snippets -> Dart (or create new)
{
"Built Value": {
"prefix": "blt",
"body": [
"abstract class ${1} implements Built<${1}, ${1}Builder> {",
"\t${0:// fields go here}",
"",
"\t${1}._();",
"",
"\tfactory ${1}([updates(${1}Builder b)]) = _$${1};",
@imba-tjd
imba-tjd / .Cloud.md
Last active May 19, 2024 05:50
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@1natsu172
1natsu172 / .eslintrc
Last active July 5, 2023 10:23
My airbnb based ESLint config for "typescript-eslint" with React & prettier
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "."
},
"env": {
"browser": true,
"jest/globals": true
},
@ikuwow
ikuwow / dein_lazy.toml
Created December 9, 2018 13:30
Install deoplete-tabnine with dein.vim
[[plugins]]
repo = 'Shougo/deoplete.nvim'
on_event = ['InsertEnter']
hook_add = '''
let g:deoplete#enable_at_startup = 1
'''
if = 'has("nvim") && has("python3")'
[[plugins]]
repo = 'tbodt/deoplete-tabnine'
@mholt
mholt / macapp.go
Last active May 11, 2024 18:15
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, json, argparse
print os.getcwd()
parser = argparse.ArgumentParser(description='Convert color assets from storyboards and xibs')
parser.add_argument('--colorSpace', dest="color_space",
type=str,
@DerekSelander
DerekSelander / dsresign
Last active April 16, 2023 02:26
Resign iOS .app directories, expects app dir, provisioning profile, [optional] new name for iOS app
#!/bin/bash
# MIT License
#
# Copyright (c) 2018 Derek Selander (@LOLgrep)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell