Skip to content

Instantly share code, notes, and snippets.

View flyher's full-sized avatar

Flyher D flyher

View GitHub Profile
@flyher
flyher / BalsamiqForever.py
Created December 6, 2023 05:01 — forked from HoussemNasri/BalsamiqForever.py
Extend your trial period for Balsamiq Wireframes on Windows and macOS Forever!
import json
import os
import time
import webbrowser
import sys
import re
def handleWindows(extra_seconds):
print("OS : Windows")
@flyher
flyher / nginx.conf
Created June 28, 2021 01:38 — forked from mccabiles/nginx.conf
Using gzip with Nginx and Vue CLI project
...
gzip on;
gzip_static on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
@flyher
flyher / example.py
Created July 31, 2019 02:49 — forked from diosmosis/example.py
Python decorator that catches exceptions and logs a traceback that includes every local variable of each frame.
import os
from log_exceptions import log_exceptions
def throw_something(a1, a2):
raise Exception('Whoops!')
@log_exceptions(log_if = os.getenv('MYAPP_DEBUG') is not None)
def my_function(arg1, arg2):
throw_something(arg1 + 24, arg2 - 24)
[core]
# The home folder for airflow, default is ~/airflow
airflow_home = /Users/p1nox/airflow
# The folder where your airflow pipelines live, most likely a
# subfolder in a code repository
dags_folder = /Users/p1nox/airflow/dags
# The folder where airflow should store its log files. This location
base_log_folder = /Users/p1nox/airflow/logs
@flyher
flyher / chai.json
Created January 23, 2019 07:37 — forked from ksco/chai.json
中文左右拆字字库
{
"卧": "臣卜",
"项": "工页",
"功": "工力",
"攻": "工攵",
"荆": "茾刂",
"邪": "牙阝",
"雅": "牙隹",
"期": "其月",
"欺": "其欠",
@flyher
flyher / calculatingS3Size.py
Created November 28, 2018 09:18 — forked from nberserk/calculatingS3Size.py
calculating S3 file size containing <your_filter> in <your_bucket> using boto3 python library.
import boto3
s3 = boto3.resource('s3')
bucket = s3.Bucket('<your_bucket>')
size = 0
for o in bucket.objects.all():
if '<your_filter>' in o.key:
print o, o.size
size += o.size
print 's3 size = %.3f GB' % (size/1024/1024/1024)
@flyher
flyher / load_jpeg_with_tensorflow.py
Last active May 18, 2018 05:46 — forked from eerwitt/load_jpeg_with_tensorflow.py
Example loading multiple JPEG files with TensorFlow and make them available as Tensors with the shape [[R, G, B], ... ].
# Typical setup to include TensorFlow.
import tensorflow as tf
# Make a queue of file names including all the JPEG images files in the relative
# image directory.
# This code will not work
# filename_queue = tf.train.string_input_producer(
# tf.train.match_filenames_once("./images/*.jpg"))
isolation.tools.getPtrLocation.disable = "TRUE"
isolation.tools.setPtrLocation.disable = "TRUE"
isolation.tools.setVersion.disable = "TRUE"
isolation.tools.getVersion.disable = "TRUE"
monitor_control.disable_directexec = "TRUE"
monitor_control.disable_chksimd = "TRUE"
monitor_control.disable_ntreloc = "TRUE"
monitor_control.disable_selfmod = "TRUE"
monitor_control.disable_reloc = "TRUE"
monitor_control.disable_btinout = "TRUE"
@flyher
flyher / 01-gulpfile.js
Created November 16, 2016 06:21 — forked from markgoodyear/01-gulpfile.js
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),