Skip to content

Instantly share code, notes, and snippets.

View dashdanw's full-sized avatar
🏠
Working from home

Dash Winterson dashdanw

🏠
Working from home
  • New York, NY
View GitHub Profile
@dashdanw
dashdanw / 1v1.cfg
Created July 8, 2023 18:57 — forked from sebastiandero/1v1.cfg
1v1 config for CSGO
bot_kick;
exec gamemode_competitive;
mp_free_armor 1;
mp_freezetime 3;
mp_weapons_allow_map_placed 1;
mp_humanteam any;
mp_restartgame 1;
mp_round_restart_delay 3;
mp_roundtime 80250;
mp_maxrounds 30;
message Keepalive {
Chat focus = 1;
}
message Chat {
bytes uuid = 1;
}
package com.dash;
import java.io.*;
import java.io.FileOutputStream;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.io.IOException;
import java.util.zip.GZIPOutputStream;
@dashdanw
dashdanw / game.py
Created May 17, 2020 14:38
weird yahtzee game
#nice loop for input
dice_count=input("How many dices do you want to use? Min 1, max 5")
while not dice_count.isnumeric() or int(dice_count) not in range(1,5):
dice_count=input(f'Sorry, {dice_count} is not a number, please input a number between 1 and 5.')
dice_count = int(dice_count)
#declare an array of soon-to-be values that we will modify as we go
dice_states = ['<empty>']*dice_count
#!/usr/bin/env bash
# updates versions in requirements.txt file
cat requirements.txt | grep -v '^\-e' | cut -d= -f1 | xargs -I {} -n1 -P1 sh -c "echo \`curl -s https://pypi.org/project/{}/ | sed -e 's/^[[:space:]]*//' | grep '{} [0-9]' | sed -e 's/ /==/g'\`"
@dashdanw
dashdanw / views.py
Created February 5, 2019 15:01
/tracks/<id>/upload
from rest_framework import viewsets
from rest_framework.status import HTTP_400_BAD_REQUEST
from rest_framework.response import Response
from mixtape.music import serializers
from mixtape.music.models import Track
from mixtape.music.models import Artist
from mixtape.music.models import Album
from rest_framework import viewsets
from rest_framework.status import HTTP_400_BAD_REQUEST
from rest_framework.response import Response
from mixtape.music import serializers
from mixtape.music.models import Track
from mixtape.music.models import Artist
from mixtape.music.models import Album
#!/bin/bash
if [[ -z $(pip3 show scdl) ]]; then
sudo pip3 install scdl
fi
SCDL_TARGET="$1"
shift
SCDL_ADD_ARGS="$@"
SCDL_TARGET_DIR="$(pwd)/$SCDL_TARGET"
#!/bin/bash
if [[ -z $(pip3 show scdl) ]]; then
sudo pip3 install scdl
fi
SCDL_TARGET="$1"
shift
SCDL_ADD_ARGS="$@"
SCDL_TARGET_DIR="$(pwd)/$SCDL_TARGET"
#!/usr/bin/env python
import sys
import stripe
email = sys.argv[1]
print(stripe.customer.create(email=email))