Skip to content

Instantly share code, notes, and snippets.

@cielavenir
cielavenir / readme.md
Last active August 28, 2024 17:39
zoom sandbox-exec for macOS
  1. Download Zoom.pkg from https://zoom.us/download
  2. Extract it using https://www.timdoug.com/unpkg/
  3. Now you have Zoom/zoom.us.app
  4. Launch Zoom by zoom.sh Zoom/zoom.us.app/Contents/MacOS/zoom.us

caveats:

  • Zoom will fail to start meeting for the first time. Just launch again.
  • Zoom will tell that crash happened, but you should ignore it.
@cielavenir
cielavenir / gtf2refGene.pl
Created May 29, 2021 08:30 — forked from zhoujj2013/gtf2refGene.pl
Convert ensembl gtf file to UCSC refGene.txt file.
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
&usage if @ARGV<1;
#open IN,"" ||die "Can't open the file:$\n";
#open OUT,"" ||die "Can't open the file:$\n";
@cielavenir
cielavenir / mkexeloadable.c
Last active February 5, 2021 07:18 — forked from x-projs/mkexeloadable.c
Make the executable file can be loaded by dlopen() after glibc>=2.30.
// https://gist.github.com/xieyubo/6820491646f9d01980a7eadb16564ddf //
/*
There is a behavior change in glibc>=2.30. dlopen() will fail if the file is
position independent executable. This code will clean up the PIE flag in the
file to bypass the dlopen() check.
MIT License (c) 2020 Yubo Xie, xyb@xyb.name
*/
@cielavenir
cielavenir / ac-DarkDebugger.user.js
Last active June 14, 2020 09:14
ac-DarkDebugger
// ==UserScript==
// @name ac-DarkDebugger
// @namespace https://github.com/my316g/
// @supportURL https://twitter.com/my316g/
// @version 0.2.2
// @description 1WA に泣く人のために
// @author my316g
// @match https://atcoder.jp/contests/*/submissions/*
// @grant none
// ==/UserScript==
@cielavenir
cielavenir / readme.md
Last active October 2, 2019 05:34
LZMA SDK C interface
@cielavenir
cielavenir / paizapoh5_5.cpp
Created January 22, 2019 16:11
paiza POH enshura #_poh special(スライドパズル) ref: https://qiita.com/cielavenir/items/56e6a60d00ed67c6c81b
#include <queue>
#include <map>
#include <random>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <unistd.h>
using namespace std;
typedef vector<vector<int>> vvii;
@cielavenir
cielavenir / bundle.js
Created December 23, 2018 16:06
atcoder problems bundle.js
This file has been truncated, but you can view the full file.
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=239)}([function(e,t,n){e.exports=n(259)()},function(e,t){e.exports=React},function(e,t,n){var o;
/*!
Copyright (c)
@cielavenir
cielavenir / build_instruction.md
Last active November 16, 2018 05:32
tensorflow windows stage1
  • Put msvc2015AdminDeployment.xml to $HOME

  • on powershell(admin):

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
cinst rapidee -y
cinst visualstudio2015community -y --timeout 0 -package-parameters "--AdminFile ./msvc2015AdminDeployment.xml"
(reboot)
cinst microsoft-build-tools --version 14.0.25420.1 -y
@cielavenir
cielavenir / __init__.py
Last active May 14, 2018 02:41
pytest session test
import pytest
import inspect
@pytest.fixture(scope="session")
def F(request):
print('setup')
yield inspect.stack()[0]
print('teardown')