Skip to content

Instantly share code, notes, and snippets.

View Ppang0405's full-sized avatar
🎉
Tet holiday

Jeremy Ppang0405

🎉
Tet holiday
  • Hanoi
View GitHub Profile

Google Clone

A fully functional replica of Google's main page, you can use it for searches and everything else. Styled with CSS to look as close as possible to current google main page, a bit of jquery magic to make it fully functional.

A Pen by Francesco Agnoletto on CodePen.

License.

ScreenShot

Node.js Essential Packages

Adrian's collection of super useful NPM packages.

Utilities

Async

  • async - Higher-order functions and common patterns for asynchronous code.
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@Ppang0405
Ppang0405 / count_messages.py
Created January 4, 2021 16:24 — forked from yi-jiayu/count_messages.py
Using Telethon and the Telegram API to count the number of messages in each of your recent conversations
from telethon import TelegramClient
from telethon.errors.rpc_errors_401 import SessionPasswordNeededError
# (1) Use your own values here
api_id = 17349
api_hash = '344583e45741c457fe1862106095a5eb'
phone = 'YOUR_NUMBER_HERE'
username = 'username'
@Ppang0405
Ppang0405 / gist:7608277e85b253071fb78983293f52e6
Created October 21, 2021 15:38 — forked from anthonyray/gist:398fde676a7704c03d6624155ba0011e
Set up OhMyZsh on Amazon EC2 instance running Ubuntu Server 14.04
  1. Connect to your EC2 instance
  2. Install zsh : sudo apt-get update && sudo apt-get install zsh
  3. Edit your passwd configuration file to tell which shell to use for user ubuntu : sudo vim /etc/passwd
  4. Look for ubuntu user, and replace bin/bash by bin/zsh
  5. Install OhMyZsh : sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  6. Disconnect from your instance and reconnect it.
@Ppang0405
Ppang0405 / aws.md
Created October 22, 2021 09:44 — forked from colinvh/aws.md
AWS Region Names

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

@Ppang0405
Ppang0405 / AndroidManifest.xml
Created November 10, 2021 12:30 — forked from Venryx/AndroidManifest.xml
Record audio on Android in the background (even when screen is off)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp">
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
<service android:name=".ForegroundService" android:enabled="true" android:exported="true"></service>
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
@Ppang0405
Ppang0405 / install.sh
Created November 24, 2021 13:26 — forked from marklit/install.sh
Bot Detection Script. Works with Apache and Nginx Log Files.
sudo apt-get update
sudo apt-get install \
python-dev \
python-pip \
python-virtualenv
virtualenv findbots
source findbots/bin/activate
curl -O http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz

Create a new project

poetry new <project-name>

Add a new lib

potry add <library>

Remove a lib