Skip to content

Instantly share code, notes, and snippets.

View futpib's full-sized avatar

futpib

View GitHub Profile
@tvorogme
tvorogme / generate.fif
Last active September 9, 2022 13:23
TON deploy smart contract
#!/usr/bin/fift -s
"TonUtil.fif" include
"Asm.fif" include
// If you dont know about stack-base languages
// Please read something before read comments and trying to understand what is going on here :)
5 :$1..n // parse arguments
$1 parse-workchain-id =: wc // set workchain id from command line argument
$2 parse-int =: subwallet-id // set subwallet id
@shakalaca
shakalaca / gist:bbc439916f389a7275083f90539059de
Created August 19, 2019 14:41
Fastboot commands for ROG Phone II
@======== Fastboot command ========
@Get info :
@>>> fastboot oem gpt-info
@>>> fastboot oem isn-info
@>>> fastboot oem ssn-info
@>>> fastboot oem system-info
@>>> fastboot oem device-info
@Get ID :
@>>> fastboot oem get-prjid
@>>> fastboot oem get-hwid
@collinbarrett
collinbarrett / userChrome.css
Last active April 11, 2024 10:22
A userChrome.css to use with Tree Style Tab (https://github.com/piroor/treestyletab) for Firefox
/*
Windows
Location: C:\Users\<YourUsername>\AppData\Roaming\Mozilla\Firefox\Profiles\<YourFirefoxProfile>\chrome
Notes:
If minimize, maximize, and close buttons are no longer visible, enable the Title Bar or Menu Bar in Firefox Customize.
macOS
Location: /Users/<YourUsername>/Library/Application Support/Firefox/Profiles/<YourFirefoxProfile>/chrome
Notes:
If minimize, maximize, and close buttons overlap other controls, add the Flexible Space in Firefox Customize.
@mediaupstream
mediaupstream / make_certs.sh
Last active April 5, 2024 19:22
extract ca-certs, key, and crt from a pfx file
#!/bin/bash
#
# Usage:
# ./make_certs.sh test.example.com
#
# The required input to make_certs.sh is the path to your pfx file without the .pfx prefix
#
# test.example.com.key
# test.example.com.crt (includes ca-certs)
@tralston
tralston / reload-config-postgresql.md
Created August 21, 2017 08:18
[Reload PostgreSQL config] After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. #postgres

After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. The easiest way to do this is by restarting the postgres service:

service postgresql restart

When the service command is not available (no upstart on Synology NAS, for example), there are some more creative ways to reload the config. Note this first one needs to be done under the user that runs postgres (usually the user=postgres).

user#  sudo su postgres
postgres#  pg_ctl reload
@braian87b
braian87b / openwrt-lede-openvpn-client.md
Last active April 2, 2021 09:33
Setting an OpenWrt / LEDE Based Router as OpenVPN Client

These instructions should work for Streisand as well for others VPN providers (Streisand is a Software that automatically configures a VPS online server with OpenVPN and other VPN/Proxy Softwares in order to have a private VPN Server)

These instructions are for getting an OpenWrt Based Router working as OpenVPN Client (should work for LEDE, Gargoyle and another distributions). Computers connected to Lan Ports of the OpenWrt Router will navigate through the Internet connection of the OpenVPN Server (in this case the Streisand one previously set up) you need a working Router with OpenWrt based firmware flashed on it (LEDE or eko.one.pl could also work) steps works well on Chaos Calmer 15.05 or 15.05.1.

  1. You need to telnet 192.168.1.1 (OpenWrt Router) and set up a password using passwd You can skip this if you already have a password and can connect using ssh.
@wader
wader / Makefile
Created April 11, 2017 18:54
libchromaprint.js
# make sure chromaprint source is in $PWD/chromaprint
# after run use $PWD/chromaprint/libchromaprint.min.js
# does not use --bind and set NO_DYNAMIC_EXECUTION to generate code
# that don't use eval
CC = emcc
CXX = em++
CFLAGS = -O2 -DUSE_KISSFFT=1 -Isrc -Ivendor/kissfft
CXXFLAGS = -O2 -std=c++11 -DUSE_KISSFFT=1 -Isrc -Ivendor/kissfft
@nt1m
nt1m / the-plan.md
Last active September 17, 2017 22:15
<iframe mozbrowser> implementation plan for WebExtensions

Implementing iframe mozbrowser> bug 1318532

Opportunities with this API

  • Tile Tabs
  • Create a wrapper around web content (à la Responsive design Mode)
  • Make use of container tabs properties for iframes
  • More secure alternative to overriding CSP to make web content iframe-able
@countingpine
countingpine / ext2scan.c
Last active December 19, 2021 18:06
ext2scan: scan for ext2/ext3/ext4 partitions
/* ext2scan:
* Scans an input stream, sector by sector, for something that looks like an ext{2,3,4} partition.
* It does this by looking for a magic WORD, 0xEF53, at a known offset into the sector.
* For random data, this will occur by chance around once per 32MB of data, so we also
* check whether the first two sectors are all zeros, which is commonly true for ext partitions.
*
* Compile with:
* gcc ./ext2scan.c -o ./ext2scan
*
* Example usage:
@subfuzion
subfuzion / curl.md
Last active May 16, 2024 18:04
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.