Skip to content

Instantly share code, notes, and snippets.

@toksdotdev
toksdotdev / secret-santa.py
Last active December 16, 2019 14:49
Give gifts to a group of people such that no family members (with same surname) should give gifts to each other.
class Person:
def __init__(self, firstname, lastname):
self._firstname = firstname
self._lastname = lastname
@property
def firstname(self):
return self._firstname
@property
<script>
/**
* Save an item to the local storage.
*/
function saveToLocalStrorage(event) {
const formValue = event.val(); // pick the text the user entered into the form
const formName = event.name; // pick up the name of the input box from the event
localStorage.setItem(formName, formValue);
}
@toksdotdev
toksdotdev / paint-brush-strike-through.css
Created October 4, 2019 18:58
Create a strike through effect of a paint brush across a portion of text.
strike.paint-brush {
position: relative;
text-decoration: none;
margin-left: -0.05em !important;
}
strike.paint-brush::after {
border-bottom: 0.225em solid #bbecf1;
margin-left: -15px !important;
border-radius: 70% 80% 40% 30%;
f60f5f8d4ed42971a29a1e36498006d89319d4976a18cbb5092c65ade0be1a044781c28502041f62c89f306903671ada5695f3f60f0cc1968f0483f207475543
@toksdotdev
toksdotdev / Simple Lang 0.3.36 Release Note.md
Last active August 17, 2018 19:50
Simple Lang 0.3.36 Release Note

SimpleLang Release Note 0.3.36

We've come a long journey in ensuring that we draw closer to a stable 1.0 in coming months. We wouldn' forget to always rmemeber the ultimate goal of Simple, which is to

Over the last release cycle, we've emphasized on enabling a smoothe embedded integration between Simple and other languages such as C/C++ and javascript, including going live on our Official Website.

Installation

  • One-Line Installation: Installing simple hasn't been greater than before with the release of a the online installer. It has been out major goal oat ensuring that the installation process becomes shorter than before. This would be available on all x86 and x64 architecture on all the following OS namely:
  • Linux
  • Windows
@toksdotdev
toksdotdev / cards-style.scss
Created June 27, 2018 11:28
Netflix like card
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,700);
// Variables
$regal-blue: #034378;
$san-juan: #2d4e68;
$bermuda: #77d7b9;
$white: #fff;
$black: #000;
$open-sans: 'Open Sans',
sans-serif;
// clear-fix mixin
@toksdotdev
toksdotdev / replace_line_in_same_line.c
Created June 26, 2018 12:36
Replace Line in print in same line
#include <stdio.h>
void clear(int size){
char num[size];
memset(num, ' ', size + 3);
printf("\r%s", num);
}
int main()
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@toksdotdev
toksdotdev / digitalocean-promo-cupon-code-free-trial.md
Created June 14, 2018 10:29
DigitalOcean Coupon Code $35 / $100 1 Year Free Trial - June 2018

alt text

Digital Ocean Promo Coupon Code $35 / $100 1 Year Free Trial

1) Get $35 / $25 / $20 / $10 free DigitalOcean Credit.

2) Get DigitalOcean 1 Year Free Trial.

3) Get $100 Credit For 60 Days. $100 Free Credits

@toksdotdev
toksdotdev / Program.cs
Created April 18, 2018 14:49
Using OOP to represent things related to sailing...
public class Vessel {
List<SeaFarer> SeaFarers; // this is private automatically to help promote data abstraction
// (data shouldn't be assessed publicly,
// instead use GetSeaFearer() in this class )
public Vessel() { // this is constructor
this.SeaFarers = new List<SeaFarers>(); // initializes the seaferes in constructor
}
public Vessel(List<SeaFarer> seaFarer) { //this is constructor overloading