Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.0/redux.min.js">
</script>
<script src="https://unpkg.com/[email protected]/dist/react.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/react-dom.min.js"></script>
@Sunil-ghodela
Sunil-ghodela / blinking-dot.html
Created September 24, 2018 04:23
Blinking dot win CSS
<div class="main">
<div class="container">
<div class="box">
<div class="circContainer">
<div class="circ"></div>
<div class="circPulse one"></div>
<div class="circPulse two"></div>
</div>
</div>
</div>
https://www.mercurytide.co.uk/media/resources/django-cheat-sheet.pdf
@Sunil-ghodela
Sunil-ghodela / add_group_inUser.txt
Last active May 3, 2019 10:52
Add group in User
https://stackoverflow.com/questions/6288661/adding-a-user-to-a-group-in-django
from django.contrib.auth.models import Group
group = Group.objects.get(name='groupname')
user.groups.add(group)
l = request.user.groups.values_list('name',flat=True)
@Sunil-ghodela
Sunil-ghodela / localhost.txt
Created April 10, 2019 07:50
connect-localhsot with remote
ifconfig
@Sunil-ghodela
Sunil-ghodela / sending_multiple_optoin
Created April 25, 2019 11:17
send multiple option from front to django view
https://stackoverflow.com/questions/618557/django-using-select-multiple-and-post
list = request.POST.getlist("items[]")
JSON.parse("["+document.querySelector("input[name='specialty']").value+"]");
// data[['type']] = payloads['room'];
// data[payloads['data']] = {};
// data[payloads['data']][payloads['type']] = payloads['create'];
// data[payloads['data']][payloads['room']] = {};
// data[payloads['data']][payloads['room']][
// payloads['started_by']
// ] = chat_starter_username;
// data[payloads['data']][payloads['room']][
// payloads['chat_invite']
// ] = false;
var $jscomp = $jscomp || {};
$jscomp.scope = {};
$jscomp.findInternal = function(g, l, v) {
g instanceof String && (g = String(g));
for (var A = g.length, G = 0; G < A; G++) {
var L = g[G];
if (l.call(v, L, G, g))
return {
i: G,
v: L
@Sunil-ghodela
Sunil-ghodela / PythonListScore.py
Created August 21, 2019 18:56
Frequency of list item in a list
we = ['a', 'w', 'a', 'i']
temp_dict = {}
for w in we:
no_count = temp_dict.get(w, '')
if no_count == '':
temp_dict[w] = 1
else:
temp_dict[w] = no_count+1