Skip to content

Instantly share code, notes, and snippets.

@astarasikov
astarasikov / convert_teegris_tas.py
Last active April 19, 2024 20:53
Exynos9820 TEEGRIS TZAR unpack script
#!/usr/bin/env python3
# Usage: python convert_teegris_tas.py ~/Downloads/sw/pda/s10/fw/fw_G973FXXU4BTA8/AP/vendor/tee/
import os
import sys
from textwrap import wrap
def teegris_ta_to_elf(path_from, path_to):
with open(path_from, 'rb') as fin:
with open(path_to, 'wb') as fout:
@somandubey
somandubey / gist:52bff8c7cc8639292629
Created August 28, 2014 19:56
How to increase ulimit in Linux

How to increase ulimit in Linux:

  • Step 1 (ulimit): open the sysctl.conf and add this line fs.file-max = 65536

      vi /etc/sysctl.conf   
    

    add following at end of file in above file:

      fs.file-max = 65536
    

save and exit.

@ScottJWalter
ScottJWalter / install-ffmpeg-WSL.sh
Created August 22, 2018 19:55
Install FFMpeg under Windows Subsystem for Linux
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ffmpeg
@noghartt
noghartt / cc.md
Last active April 19, 2024 20:48
Resources to learn more about Computer Science and related stuffs
@endrsmar
endrsmar / index.ts
Created January 9, 2024 12:11
Raydium new pool listener
import { LiquidityPoolKeysV4, MARKET_STATE_LAYOUT_V3, Market, TOKEN_PROGRAM_ID } from "@raydium-io/raydium-sdk";
import { Connection, Logs, ParsedInnerInstruction, ParsedInstruction, ParsedTransactionWithMeta, PartiallyDecodedInstruction, PublicKey } from "@solana/web3.js";
const RPC_ENDPOINT = 'https://api.mainnet-beta.solana.com';
const RAYDIUM_POOL_V4_PROGRAM_ID = '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8';
const SERUM_OPENBOOK_PROGRAM_ID = 'srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX';
const SOL_MINT = 'So11111111111111111111111111111111111111112';
const SOL_DECIMALS = 9;
const connection = new Connection(RPC_ENDPOINT);
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 19, 2024 20:45
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@lemmensaxel
lemmensaxel / Auth.tsx
Last active April 19, 2024 20:45
React-native expo + keycloak PKCE flow implemented using expo AuthSession
import {
ActivityIndicator,
Button,
ScrollView,
Text,
View,
} from "react-native";
import * as AuthSession from "expo-auth-session";
import * as WebBrowser from "expo-web-browser";
import { useEffect, useState } from "react";
@jchristof
jchristof / AccessAndQuery.cs
Created May 12, 2018 15:01
Get Spotify access token and basic query in c#
class AccessAndQuery {
static HttpClient httpClient = new HttpClient();
private class AccessToken {
public string access_token { get; set; }
public string token_type { get; set; }
public int expires_in { get; set; }
public string scope { get; set; }
}
@andrieslouw
andrieslouw / cfban.php
Created October 11, 2016 15:21
Cloudflare V4 PHP API - block / unblock IP in firewall
<?php
/**
* @author https://github.com/andrieslouw
* @copyright 2016
**/
function cfban($ipaddr){
$cfheaders = array(
'Content-Type: application/json',
'X-Auth-Email: your@email.com',