Skip to content

Instantly share code, notes, and snippets.

View niclin's full-sized avatar

Nic niclin

View GitHub Profile
@JofArnold
JofArnold / BoredApeYachtClub.sol
Last active April 9, 2023 12:44
The Bored Ape Yacht Club (BAYC) Solidity Smart Contract GitHub
/**
*Submitted for verification at Etherscan.io on 2021-04-22
*/
// File: @openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
@drakantas
drakantas / chat.css
Last active January 2, 2024 01:17
Streamlabs Chatbox with avatars
@import url('https://fonts.googleapis.com/css?family=Orbitron&display=swap');
* {
display;
box-sizing: border-box;
}
html, body {
height: 100%;
overflow: hidden;
@huacnlee
huacnlee / rails-docker-build-speed-up.md
Last active September 8, 2020 05:15
给 Rails 应用 Docker Image 打包过程增加 cache,依靠 GitLab CI 的 cache 来加速

.yarnrc

我们需要在 Rails 项目根目录配置 .yarnrc 告诉 Yarn 我们需要将 npm 的包缓存到 vendor/cache/npm 目录。

registry "https://registry.npm.taobao.org"
lastUpdateCheck 1561690751463
yarn-offline-mirror "./vendor/cache/npm"     
yarn-offline-mirror-pruning true

Benchmarks for GC Compactor

GC benchmarks for trunk vs gc-compact seem to be about the same:

$ make benchmark ITEM=gc
./revision.h unchanged
/Users/aaron/.rbenv/shims/ruby --disable=gems -rrubygems -I./benchmark/lib ./benchmark/benchmark-driver/exe/benchmark-driver \
	            --executables="compare-ruby::/Users/aaron/.rbenv/shims/ruby --disable=gems -I.ext/common --disable-gem" \
	            --executables="built-ruby::./miniruby -I./lib -I. -I.ext/common  -r./prelude --disable-gem" \
@bazzel
bazzel / README.md
Last active March 20, 2022 22:00
Webpacker and I18n
$ rails new my-i8n --webpack

Gemfile

gem 'i18n-js'
@virolea
virolea / upload.js
Last active March 15, 2024 13:45
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active March 1, 2024 14:39
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active April 12, 2024 08:49
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.5.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
/*
// ########################################################################## */
// New cheat sheet for Bootstrap 5:
@monkianer
monkianer / getScrollTop.js
Created July 31, 2017 14:53
Fix the 'ie' is not compatible with window.scrollY
/**
* Fix the 'ie' is not compatible with window.scrollY
* test with ie 9, 10, 11, edge.
**/
function getScrollTop(){
var t = typeof window.scrollY === 'undefined' ? window.pageYOffset : window.scrollY;
return t;
}
@xdite
xdite / 2017-06-01.md
Last active June 22, 2017 07:18
参与全栈学习这么久,你觉得自己和之前最大的不同是? (直播问卷答案-共94份答案)

参与全栈学习这么久,你觉得自己和之前最大的不同是?

对编程有了系统的概念,之前总是从入门到放弃,这次终于自己能够做出完整的作品,对于自己学习其它技能的自信心也大大增强了,自己的小创意有了实现的能力,对于编程的越来越有热情。

关于全栈,之前一直觉得自己很全能,什么都会一点,但是在参加 jdstore 比赛的时候发现,一个人的时间是非常有限的,和他人配合能够大大的提高效率,大家一起做才能够在有限的时间内完成理想中的工作量,所以自己会做是一方面,懂得和人配合,团队之间的沟通也非常重要。

参与全栈学习这么久,你觉得自己和之前最大的不同是?

  1. 学会了主动学习,对自己更加自信,不再惧怕挑战。
  2. 每日写orid,让自己的逻辑更加清楚。