Skip to content

Instantly share code, notes, and snippets.

View dennohpeter's full-sized avatar
🦀
Rust`edSoul

Dennoh Peter dennohpeter

🦀
Rust`edSoul
View GitHub Profile
@dennohpeter
dennohpeter / index.html
Created June 1, 2019 13:02
Scroll to the next section
<div class="section custom-full1">Some section</div>
<div class="section">Some section</div>
<div class="section custom-full1">Some section</div>
<div class="section">Some section</div>
<div class="section custom-full1">Some section</div>
<div class="section">Some section</div>
<div class="section custom-full1">Some section</div>
<div class="section">Some section</div>
@dennohpeter
dennohpeter / serialize.js
Last active June 15, 2019 15:01
How to serialize form data with vanilla JS
/*!
* Serialize all form data into a query string
* (c) 2018 Chris Ferdinandi, MIT License, https://gomakethings.com
* @param {Node} form The form to serialize
* @return {String} The serialized form data
*/
var serialize = function (form) {
// Setup our serialized data
var serialized = [];
@dennohpeter
dennohpeter / README.md
Created August 7, 2019 07:56 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@dennohpeter
dennohpeter / .py
Created June 16, 2020 04:49
Blog create
# @login_required
@staff_member_required
def blog_post_create_view(request):
form = BlogModelForm(request.POST or None, request.FILES or None)
if form.is_valid():
print(form.cleaned_data)
form = form.save(commit=False)
@dennohpeter
dennohpeter / models.py
Created February 4, 2021 11:32 — forked from mushonnip/models.py
Django model to generate unique id/ booking id/ transaction id
import uuid
class Booking(models.Model):
booking_no = models.CharField(primary_key=True, default=uuid.uuid4().hex[:5].upper(), max_length=50, editable=False)
def __str__(self):
return str(self.booking_no)
372433594