Skip to content

Instantly share code, notes, and snippets.

@JKirchartz
JKirchartz / html5 notepad
Created November 26, 2011 03:28
simple html5 Notepad, saves in localStorage, but you can only have one note at a time.
<!DOCTYPE html>
<html><head><meta charset="UTF-8">
<title>HTML5 notepad app</title>
<meta charset="utf-8">
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<style>
html,body{background:#FCFCFC;color:#444;height:100%;width:100%;margin:0;padding:0;}
#notepad{height:98%;width:98%;padding:1%;font-size:100%;line-height:125%;font-family:san-serif}
::selection{background:#7D7}
::-moz-selection{background:#7D7}
@markopy
markopy / streamlit_command_line.py
Created October 22, 2019 16:23
How to parse command line arguments in streamlit with argparse
# An Example of how to parse command line arguments in streamlit.
# This is free and unencumbered software released into the public domain.
import os
import sys
import random
import argparse
import streamlit as st
parser = argparse.ArgumentParser(description='This app lists animals')
@soof-golan
soof-golan / Dockerfile
Last active April 30, 2024 08:31
Python + Poetry + Docker Example
FROM python:3.10 as python-base
# https://python-poetry.org/docs#ci-recommendations
ENV POETRY_VERSION=1.2.0
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VENV=/opt/poetry-venv
# Tell Poetry where to place its cache and virtual environment
ENV POETRY_CACHE_DIR=/opt/.cache
@timurbakibayev
timurbakibayev / tetris.py
Last active April 30, 2024 08:29
Tetris game in Python
import pygame
import random
colors = [
(0, 0, 0),
(120, 37, 179),
(100, 179, 179),
(80, 34, 22),
(80, 134, 22),
(180, 34, 22),
@andrewrk
andrewrk / fizzbuzz.zig
Last active April 30, 2024 08:28
fizzbuzz in zig
const std = @import("std");
pub fn main() void {
var i: usize = 1;
while (i <= 100) : (i += 1) {
if (i % 3 == 0 and i % 5 == 0) {
std.debug.warn("FizzBuzz\n");
} else if (i % 3 == 0) {
std.debug.warn("Fizz\n");
} else if (i % 5 == 0) {
@techdecline
techdecline / Add-PsScriptTaskSystem.ps1
Created January 14, 2020 09:20
PowerShell function to register a scheduled task running as SYSTEM
function Add-PsScriptTaskSystem {
param (
[Parameter(Mandatory)]
[String]$TaskName,
[Parameter(Mandatory)]
[String]$ScriptPath
)
$taskName = $TaskName
$trigger = New-ScheduledTaskTrigger -AtLogOn
@ppisarczyk
ppisarczyk / Programming_Languages_Extensions.json
Last active April 30, 2024 08:27 — forked from aymen-mouelhi/languages.json
Programming Languages and their File Extensions
[
{
"name":"ABAP",
"type":"programming",
"extensions":[
".abap"
]
},
{
"name":"AGS Script",
@sebastian-de
sebastian-de / laptop_unsuck.json
Last active April 30, 2024 08:26
Easy Effects preset to improve the sound of the Thinkpad P14s Gen 2 AMD built-in speakers . An updated version can be found here: https://github.com/sebastian-de/easyeffects-thinkpad-unsuck
{
"output": {
"bass_enhancer": {
"amount": 22.0,
"blend": 0.0,
"floor": 10.0,
"floor-active": true,
"harmonics": 9.999999999999995,
"input-gain": 0.0,
"output-gain": -8.0,
@noteeeeee
noteeeeee / JetBrainsActivation.md
Last active April 30, 2024 08:24
Webstorm/JetBrains products activation 2024 (Windows/MacOS)

Webstorm/JetBrains products activation 2024 (Windows/MacOS)

1.Proxy Settings

  1. Step 1: Navigate to Proxy settings.
  2. Step 2: Select "Manual proxy settings - HTTP".
    • Hostname: localhost
    • Port: 80

Set no proxy for:

@TechFounder
TechFounder / style.css
Created June 27, 2016 03:05
Buddha bless your code to be bug free
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \