Skip to content

Instantly share code, notes, and snippets.

View aapis's full-sized avatar
🐝

Яyan Priebe aapis

🐝
View GitHub Profile
@aapis
aapis / content.md
Created June 1, 2021 15:58
Gist from Drafts

Tokenizer idea 3.0

Just convert it to JSON using regex

@aapis
aapis / codegolf-01082021.php
Last active January 8, 2021 23:23
Email obfuscator
<?php
$email = "[email protected]";
$expectedResult = "ma*****@co***********.com";
$result = obfuscator($email);
if ($result == $expectedResult) {
echo "You're great and smart".PHP_EOL;
exit(0);
} else {
@aapis
aapis / whofirst.rb
Last active September 14, 2020 16:44
#! /usr/bin/ruby
# Really dumb slack bot. Change the contents of the people array, run script. Start
# ngrok, create slack app with a "slash command", use URL from ngrok
require 'sinatra'
def who_first
cache = '.wholast'
people = [:Name1, :Name2]
@aapis
aapis / update_vsc.sh
Last active August 27, 2021 09:15
Update Visual Studio Code on Ubuntu/Debian
#!/bin/bash
clear
mkdir -p /tmp/vsc-updates
rm -f /tmp/vsc-updates/*.deb
local IFS=$'\n'
local CURRENT_VERSION=($(code -v))
@aapis
aapis / task.json
Created March 19, 2019 18:20
Visual Studio Code task for updating VSC on Debian
{
"version": "2.0.0",
"tasks": [
{
"label": "Update Visual Studio Code",
"type": "shell",
"command": "wget --user-agent Mozilla --content-disposition -E -c https://go.microsoft.com/fwlink/?LinkID=760868 && mkdir -p /tmp/vsc-updates && mv *.deb /tmp/vsc-updates/ && sudo apt install /tmp/vsc-updates/*.deb",
"problemMatcher": []
}
]
@aapis
aapis / settings.json
Last active November 27, 2018 21:25
VS Code Settings
// Place your settings in this file to overwrite the default settings
{
"files.exclude": {
"obj/": true
},
"window.nativeTabs": true,
"files.trimTrailingWhitespace": true,
"editor.renderWhitespace": "all",
"workbench.iconTheme": "eq-material-theme-icons-darker",
"editor.cursorStyle": "block",
#!/usr/bin/env ruby
# !IMPORTANT
# requires evertils-common 0.3.4/0.3.4.1-dev
require 'evertils/common'
require 'notifaction'
require 'date'
en = Evertils::Common::Query::Simple.new
@aapis
aapis / applicant.php
Last active December 14, 2016 21:41
Should apply?
<?php
function starburstApplicant()
{
$coding_skills = array("awesome", "ninja-like");
$people_skills = array("great", "super-duper");
$should_apply = false;
if(in_array("awesome", $coding_skills) && in_array("great", $people_skills)) {
$should_apply = true;
@aapis
aapis / daily.enml
Created December 6, 2016 21:18
daily.enml
<div><span style="font-size: 18px;">Logs</span></div>
<ul>
<li>...</li>
</ul>
<br />
<div><span style="font-size: 18px;">Meta</span></div>
<ul>
<li>Tasks Completed
<ul>
<li>...</li>
@aapis
aapis / verify.rb
Last active October 26, 2016 21:54
Simple website checker; compares the site's URL against a known string
#!/usr/bin/ruby
require "open-uri"
require "nokogiri"
NUM_HITS = 50
def _request(url)
begin
open(url, :read_timeout => 5).read