Skip to content

Instantly share code, notes, and snippets.

@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
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \

How to install dlib v19.9 or newer (w/ python bindings) from github on macOS and Ubuntu

Pre-reqs:

  • Have Python 3 installed. On macOS, this could be installed from homebrew or even via standard Python 3.6 downloaded installer from https://www.python.org/download. On Linux, just use your package manager.
  • On macOS:
    • Install XCode from the Mac App Store (or install the XCode command line utils).
    • Have homebrew installed
  • On Linux:
@RobinLinus
RobinLinus / zkCoins.md
Last active April 30, 2024 08:19
zkCoins: A payment system with strong privacy and scalability, combining a client-side validation protocol with validity proofs

zkCoins

zkCoins is a novel blockchain design with strong privacy and scalability properties. It combines client-side validation with a zero-knowledge proof system. The chain is reduced to a minimum base layer to prevent double spending. Most of the verification complexity is moved off-chain and communicated directly between the individual sender and recipient of a transaction. There are very few global consensus rules, which makes block validation simple. Not even a global UTXO set is required.

In contrast to zk-rollups there is no data availability problem, and no sequencer is required to coordinate a global proof aggregation. The protocol can be implemented as an additional layer contained in Bitcoin's blockchain (similar to RGB[^5] or Taro[^6]) or as a standalone sidechain.

The throughput scales to hundreds of transactions per second without sacrificing decentralization.

Design Principles

The core design principle is to *"use the chain for what the chain is good for, which is an immutable order

@op
op / bash-history-to-zsh-history.py
Created September 28, 2012 21:25
Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | bash-history-to-zsh-history >> ~/.zsh_history
import sys
def main():