Skip to content

Instantly share code, notes, and snippets.

@hcwhan
hcwhan / gist:28bc1b2cd26446b970864db02098ea90
Created December 8, 2017 03:53
联通WO-27s HG8321R光猫改桥接

#联通WO-27s HG8321R光猫改桥接

  1. 访问http://192.168.1.1/cu.html
  2. 登陆用户名CUAdmin,密码CUAdmin
  3. 进入基本设置-> 上行线路配置,记下 2_Internet_xxx 链接中的 Vlan id,我这里是10,删除 2_Internet_xxx 链接,重启光猫。
  4. 重复步骤1和2,以管理员登录,在基本设置-> 上行线路配置中新增 Wan 链接,模式选择桥接,选中Vlan,将 Vlan id 设置成之前记录下的 Vlan id,服务模式选 Internet
  5. 选择端口1进行绑定,之后用路由器接在对应端口上,使用帐号密码进行拨号就OK了。
import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job
from pyspark.sql.functions import *
from awsglue.dynamicframe import DynamicFrame
@hjbotha
hjbotha / free_ports.sh
Last active May 8, 2024 14:15
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 14:15
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@RafaelKuhn
RafaelKuhn / $ Dotfiles
Last active May 8, 2024 14:13
Bash profile and config files
Common dotfiles like .bash_profile, .bashrc

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. Create Free AWS Account

Create free AWS Account at https://aws.amazon.com/

2. Create and Lauch an EC2 instance and SSH into machine

I would be creating a t2.medium ubuntu machine for this demo.

@ruru-m07
ruru-m07 / README.md
Created May 8, 2024 14:01
piyushgarg cloud-ide setup in github codespaces
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@sadikaya
sadikaya / git-bash-in-webstorm.md
Last active May 8, 2024 14:04
git bash inside Webstorm terminal

Go to File -> Settings -> Tools -> Terminal and change Shell path based on the the installed git version.

for 64bit:

"C:\Program Files\Git\bin\sh.exe" --login -i

for 32bit:

"C:\Program Files (x86)\Git\bin\sh.exe" --login -i
@mikesmullin
mikesmullin / x86-assembly-notes.md
Last active May 8, 2024 14:01
Notes on x86-64 Assembly and Machine Code

Mike's x86-64 Assembly (ASM) Notes

Assembling Binary Machine Code

Operating Modes:

These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.

Modern operating systems, booted inside Real mode,