Skip to content

Instantly share code, notes, and snippets.

View Xvezda's full-sized avatar
418 I'm a teapot

Xvezda Xvezda

418 I'm a teapot
View GitHub Profile
@Xvezda
Xvezda / ppscan.py
Last active April 26, 2017 00:30
ppscan is simple python port scanner. python2 required. ©under MIT License.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (c) 2017 Xvezda
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
@Xvezda
Xvezda / clike.py
Created April 26, 2017 08:44
how to argc(v) in python :)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
def main(argc, argv):
print 'argc:', argc
print 'argv:', argv
if __name__ == '__main__':
@Xvezda
Xvezda / pseudo-asmi.c
Last active July 28, 2017 00:47
Pseudo x86 Assembly Interpreter
/*
* Pseudo Assembly interpreter
* by. Xvezda (xvezda@naver.com)
*
* < The MIT License >
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
@Xvezda
Xvezda / index.php
Created April 10, 2018 11:24
PHP static file query string ( by last modification time ) for browser cache revalidate
<?php
function load_script($file) {
echo '<script type="text/javascript" src="' . $file . "?t=" . filemtime($file) . '">
</script>' . PHP_EOL;
}
?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
@Xvezda
Xvezda / again.swift
Last active December 4, 2018 08:48
How to repeat or duplicate word in Swift by using extension
/* Copyright (C) 2018 Xvezda <https://xvezda.com/> */
/* MIT License */
extension String {
func again(count: Int, with: String=" ") -> String {
if count <= 0 { // Ignore when count is less then zero.
return self
}
var stringBuilder = self
for _ in 0..<count {
stringBuilder.append(with+self)
@Xvezda
Xvezda / swap.swift
Last active December 4, 2018 08:48
Swift "Swap" operator by using generics and extension
/* Copyright (C) 2018 Xvezda <https://xvezda.com/> */
/* MIT License */
func swap<T> (_ a: inout T, _ b: inout T) {
let temp: T = a
a = b
b = temp
}
infix operator <=>: AssignmentPrecedence
@Xvezda
Xvezda / docker-compose.yml
Last active April 28, 2019 11:42
docker compose file for deeplearningzerotoall/TensorFlow
version: '3'
services:
tensorflow:
image: deeplearningzerotoall/tensorflow
container_name: tf
command: sh run_jupyter_docker.sh
volumes:
- ./:/workspace/
ports:
@Xvezda
Xvezda / roundrobin.py
Created November 7, 2019 11:15
Python roundrobin version 2-3 compatible implementation
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import itertools
def roundrobin(*iterables):
# https://docs.python.org/3/library/itertools.html
"roundrobin('ABC', 'D', 'EF') --> A D E B F C"
@Xvezda
Xvezda / gist:765c578b036633584df9de662a95d3e9
Created November 27, 2019 14:52 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Xvezda
Xvezda / lazygit.sh
Last active December 8, 2019 06:06
#!/usr/bin/env bash
# Copyright (c) 2019 Xvezda <https://xvezda.com/>
#
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
# Requested by @BooDeer