Skip to content

Instantly share code, notes, and snippets.

View no13bus's full-sized avatar
🎯
Focusing

DanielJia no13bus

🎯
Focusing
View GitHub Profile
@liviocunha
liviocunha / boilerplatesimpledjangoninja.sh
Last active October 8, 2024 02:20
Boilerplate Simple Django Ninja
# V 0.0.3
# 2021-05-05
# Shell script to create a very simple Django Ninja project.
# This script require Python 3.x and pyenv
# Settings.py is config to Django 3.1.5 and Django Ninja 0.12.1
# The project contains:
# Settings config
# Admin config
@EugeneTheDev
EugeneTheDev / DotsLoaders.kt
Created March 18, 2021 23:15
Dots loading animations with Jetpack Compose
import androidx.compose.animation.core.*
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
我本想享受生活,结果发现活下来都很困难。
你的计划,就像零食,吃到肚子里之后就是个屁。
我已经不是那个花五十块钱,也要考虑很久的小孩了,现在五块钱都要深思熟虑。
今天天气很好,在房间里宅久了,准备去客厅散散心。
春节你要小心了,毕竟过年,都是要杀猪的。
经过多年的打拼,虽然没有什么收获,但你有债呀!
人为什么叫人类,因为人活着就是累。
说错话不要紧,你还会继续说错的。
你倒下了,能顶替你的人千千万
你获得了很多金钱,但同时也失去了很多东西,比如烦恼。
@jwilson8767
jwilson8767 / es6-element-ready.js
Last active February 24, 2025 08:50
Wait for an element to exist. ES6, Promise, MutationObserver
// MIT Licensed
// Author: jwilson8767
/**
* Waits for an element satisfying selector to exist, then resolves promise with the element.
* Useful for resolving race conditions.
*
* @param selector
* @returns {Promise}
*/
@wojteklu
wojteklu / clean_code.md
Last active April 15, 2025 14:57
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

@lalkmim
lalkmim / codility_solutions.txt
Last active December 21, 2024 23:35
Codility Solutions in JavaScript
Lesson 1 - Iterations
- BinaryGap - https://codility.com/demo/results/trainingU2FQPQ-7Y4/
Lesson 2 - Arrays
- OddOccurrencesInArray - https://codility.com/demo/results/trainingFN5RVT-XQ4/
- CyclicRotation - https://codility.com/demo/results/trainingSH2W5R-RP5/
Lesson 3 - Time Complexity
- FrogJmp - https://codility.com/demo/results/training6KKWUD-BXJ/
- PermMissingElem - https://codility.com/demo/results/training58W4YJ-VHA/
@v5tech
v5tech / ffmpeg.md
Last active October 14, 2024 19:57
ffmpeg视频合并、格式转换、截图

使用ffmpeg合并MP4文件

ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
from __future__ import absolute_import
import signal
import gevent
import gevent.pool
from rq import Worker
from rq.timeouts import BaseDeathPenalty, JobTimeoutException
from rq.worker import StopRequested, green, blue
from rq.exceptions import DequeueTimeout
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2025 08:16
A badass list of frontend development resources I collected over time.
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e