Skip to content

Instantly share code, notes, and snippets.

Working from home

Dimitris Gravanis dimgrav

Working from home
  • Greece
View GitHub Profile
ragecryx /
Last active Jul 22, 2019
AntDesign Table x Django-Filters -- Ascend/Descend parameters support
class AntCompatibleOrderingFilter(filters.OrderingFilter):
def __init__(self, *args, **kwargs):
super(AntCompatibleOrderingFilter, self).__init__(*args, **kwargs)
def build_choices(self, fields, labels):
Adds support for {field}-ascend and {field}-descend choices
ascending = [
(f"{param}-ascend", labels.get(field, _(pretty_name(param))))
rbresjer / IOSWifiManager.h
Last active Aug 31, 2021
Programatically join Wi-Fi network on iOS with React Native wrapper for NEHotspotConfiguration
View IOSWifiManager.h
// Created by Rutger Bresjer on 10/10/2017
// Notes:
// - Be sure to enable "Hotspot Configuration" capability for the iOS target
// - Make sure the NetworkExtension framework is linked to the target
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
@interface IOSWifiManager : NSObject <RCTBridgeModule>
joepie91 /
Last active Oct 21, 2021
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
marty-wang / gist:5a71e9d0a6a2c6d6263c
Last active Jul 21, 2021
Compile and deploy React Native Android app of Release version to device.
View gist:5a71e9d0a6a2c6d6263c
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/" -o "android/app/src/main/assets/"
hrj /
Created Jul 4, 2014 | A red+green tint effect for the entire screen
# Call with a percentage value from 0 to 100
# 0 means only red and green, 50 means half of blue is shown through
# if you don't give any arguments the calibration is cleared
if [[ -z "$1" ]]; then
echo Clearing all calibrations
xcalib -clear
andreif /
Last active Sep 29, 2021
A simple unix/linux daemon in Python

A simple unix/linux daemon in Python



by Sander Marechal

I've written a simple Python class for creating daemons on unix/linux systems. It was pieced together for various other examples, mostly corrections to various Python Cookbook articles and a couple of examples posted to the Python mailing lists. It has support for a pidfile to keep track of the process. I hope it's useful to someone.