Skip to content

Instantly share code, notes, and snippets.

View alirezaafkar's full-sized avatar
🏠
Working from home

Alireza Afkar alirezaafkar

🏠
Working from home
View GitHub Profile
@rsms
rsms / pdf-to-svg.md
Last active February 21, 2023 09:04

Converting PDF → SVG

Surprisingly complicated. Figma supports SVG → PDF but not the other way around. Sketch supports PDF → SVG with some bugs (often vector shape overlaps are incorrect.)

dawbarton/pdf2svg looks like an interesting project that could be compiled as WASM but it is itself poinsoned by GNU GPL license. Plus, it depends on a huge amount of (also GPL-licensed) code in the form of Poppler and Cairo.

@seanhenry
seanhenry / resign.sh
Last active April 24, 2024 09:14
Resign an ipa and change the build number
APPNAME=App
BUILDNUMBER=123
CERTIFICATE="iPhone Distribution"
cp "${APPNAME}.ipa" "${APPNAME}.zip"
mkdir contents || true
unzip "${APPNAME}.zip" -d contents
codesign -d --entitlements :Entitlements.plist "contents/Payload/${APPNAME}.app"
plutil -replace CFBundleVersion -string "${BUILDNUMBER}" "contents/Payload/${APPNAME}.app/Info.plist"
rm -r "contents/Payload/${APPNAME}.app/_CodeSignature"
@jmgirven
jmgirven / VariableSpeedMediaCodecVideoTrackRenderer.java
Last active February 28, 2018 05:47
A MediaCodecVideoTrackRenderer that allows playback rate to be changed. DemoPlayer has access to videoRenderer where the playback rate can be changed.
import android.content.Context;
import android.os.Handler;
import android.os.SystemClock;
import com.google.android.exoplayer.ExoPlaybackException;
import com.google.android.exoplayer.MediaClock;
import com.google.android.exoplayer.MediaCodecSelector;
import com.google.android.exoplayer.MediaCodecVideoTrackRenderer;
import com.google.android.exoplayer.SampleSource;
@bryanstern
bryanstern / OkHttpStack.java
Last active April 24, 2022 03:17
An OkHttp backed HttpStack for Volley
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Circle Internet Financial
*
* 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, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 27, 2024 13:28
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k