Skip to content

Instantly share code, notes, and snippets.

View V3ntus's full-sized avatar
Remind me to code again

Ventus V3ntus

Remind me to code again
View GitHub Profile
@foxxyz
foxxyz / nginx.conf
Last active March 3, 2024 10:42
Serve current directory via nginx
# Extremely basic development setup to serve the current directory at http://localhost:9001
# Start nginx in this directory with `nginx -p . -c nginx.conf`
# Stop nginx with `nginx -p . -s stop`
events {}
http {
# Serve files with correct mimetypes on OSX
# location may have to be adjusted depending on your OS and nginx install
include /usr/local/etc/nginx/mime.types;
@iosecure
iosecure / iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment.md
Last active May 7, 2024 14:23
iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

@mcescalante
mcescalante / sqlite3json.py
Last active November 27, 2021 20:11
Python SQLite3 INSERT & SELECT for JSON
import sqlite3
import json
conn = sqlite3.connect('test.db')
c = conn.cursor()
# Insert values
c.execute('''insert into data values(?)''', (json.dumps({'test':'test2'}),))
conn.commit()
@kuanghan
kuanghan / athena_cuda.md
Last active May 24, 2024 21:55
Install NVIDIA driver & CUDA inside an LXC container running Ubuntu 16.04

Installing NVIDIA Driver & CUDA inside an LXC container running Ubuntu 16.04 on a neuroscience computing server.

Introduction: I was trying to run some neuroscience image processing commands that uses NVIDIA GPU. The challenge is that most of our computation will be run inside an LXC container running Ubuntu 16.04 (the host runs Ubuntu 16.04 as well). Installing the NVIDIA driver on the host is not so hard, but doing it inside the LXC container is much more challenging.

I already have an unprivileged container running, so I will not repeat the steps to create an LXC container here.

Our graphics card is NVIDIA GeForce GTX 1080 Ti.

Here are the main steps:

@steven2358
steven2358 / ffmpeg.md
Last active June 23, 2024 18:17
FFmpeg cheat sheet
@kevinwright
kevinwright / proresproxy.sh
Last active February 18, 2024 21:14
Use ffmpeg to build prores proxies for Premiere Pro
#!/usr/bin/env bash
# Usage notes
# ===========
#
# proxy_watermark.png needs to be in the same directory as the script
# download from here: http://whoismatt.com/images/2016/7-july/adobe_proxy_logo.png
#
# on OSX, both pv and ffmpeg will need to be installed via homebrew
@slightfoot
slightfoot / stream_text.dart
Last active January 30, 2024 06:45
Streaming Text in Flutter
import 'dart:async';
import 'package:flutter/material.dart';
void main() =>
runApp(MaterialApp(
home: ExampleScreen(),
));
class ExampleScreen extends StatelessWidget {
@MeguminSama
MeguminSama / Discord Experiments.js
Last active June 7, 2024 14:14
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@matthew-carroll
matthew-carroll / dry_layout_stop_gap.dart
Created January 3, 2021 00:39
DryIntrinsicWidth and DryIntrinsicHeight
/// Same as `IntrinsicWidth` except that when this widget is instructed
/// to `computeDryLayout()`, it doesn't invoke that on its child, instead
/// it computes the child's intrinsic width.
///
/// This widget is useful in situations where the `child` does not
/// support dry layout, e.g., `TextField` as of 01/02/2021.
class DryIntrinsicWidth extends SingleChildRenderObjectWidget {
const DryIntrinsicWidth({Key key, Widget child})
: super(key: key, child: child);