Skip to content

Instantly share code, notes, and snippets.

View ging-dev's full-sized avatar
😘
Còn sống nè

Thanh Trần ging-dev

😘
Còn sống nè
  • Việt Nam Tp. Thái Nguyên, Thái Nguyên
View GitHub Profile
@ging-dev
ging-dev / gnome.sh
Created June 11, 2022 14:15
Cài đặt Gnome Flashback Metacity trên Google Shell Cloud
# >_ Gingteam 2022
sudo apt-get update -y
wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo apt install --assume-yes ./chrome-remote-desktop_current_amd64.deb
sudo DEBIAN_FRONTEND=noninteractive \
apt install --assume-yes gnome-session-flashback nautilus gnome-terminal firefox-esr
@ging-dev
ging-dev / colab.sh
Last active January 10, 2024 10:28
# >_ Gingteam 2022
sudo apt-get update -y
wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo apt install --assume-yes ./chrome-remote-desktop_current_amd64.deb
sudo DEBIAN_FRONTEND=noninteractive \
apt install --assume-yes gnome-session-flashback nautilus gnome-terminal firefox
@ging-dev
ging-dev / curl.md
Created June 22, 2022 09:31
curl command
curl -XGET -H 'Referer: http://www.nettruyenco.com/' 'http://i551.ntcdntempv26.com/data/images/41411/833586/001.jpg?data=net' --output image.jpg
<?php
require __DIR__.'/vendor/autoload.php';
use Symfony\Component\HttpClient\HttpClient;
$client = HttpClient::create();
$response = $client->request('GET', 'https://api.openweathermap.org/data/2.5/weather?lat=21.593700&lon=105.844513&appid=9180be2fb7b4e63ec3025dd22d8f0023');
foreach ($response->toArray()['weather'] as $weather) {
<?php
$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setCreator("Govinda")
->setLastModifiedBy("Govinda")
->setTitle("Office 2007 XLSX Test Document")
->setSubject("Office 2007 XLSX Test Document")
->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
->setKeywords("office 2007 openxml php")
->setCategory("Test result file");
@ging-dev
ging-dev / tutorial.md
Last active April 8, 2023 14:14
Apache Bigtop

Cách thêm source list của apache bigtop vào apt repository của Ubuntu 22.04:

wget -O /etc/apt/sources.list.d/bigtop-3.2.0.list http://archive.apache.org/dist/bigtop/bigtop-3.2.0/repos/ubuntu-22.04/bigtop.list
wget -O- https://dlcdn.apache.org/bigtop/bigtop-3.2.0/repos/GPG-KEY-bigtop | apt-key add -
  • Upload và giải nén code
  • Vào App store, cài php 8.2
  • Vào phần setting của php 8.2 trên appstore > configuration file, tìm dòng disable_functions=... xóa đi và lưu lại
  • Vào terminal của website chạy lệnh composer update
  • Vào conf của website:
    • Chọn site directory, trỏ site directory đến thư mục public của code > save, đồng thời tắt Anti-XSS attack (Base directory limit)(open_basedir) trên góc.
    • Tại phần url rewrite thêm:
    location / {
    

try_files $uri @rewriteapp;

s = input()
digits = {0: 6, 1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 3, 8: 7, 9: 6}
total = 0
for num in s:
total += digits[int(num)]
def max_number(n: int, cost: int):
@ging-dev
ging-dev / gingteam_chatbot.ipynb
Created January 29, 2024 13:00
gingteam_chatbot.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.