Skip to content

Instantly share code, notes, and snippets.

View IronnMan's full-sized avatar
:octocat:
I may be slow to respond.

wenlin42 IronnMan

:octocat:
I may be slow to respond.
  • Guangdong, China
View GitHub Profile
@Xavier59
Xavier59 / privatekeysolana.js
Created December 28, 2021 14:49
Convert Solana private key from/to base58/uint8array
// exporting from a bs58 private key to an Uint8Array
// == from phantom private key to solana cli id.json key file
// npm install bs58 @solana/web3.js
const web3 = require("@solana/web3.js");
const bs58 = require('bs58');
let secretKey = bs58.decode("[base58 private key here]");
console.log(`[${web3.Keypair.fromSecretKey(secretKey).secretKey}]`);
// exporting back from Uint8Array to bs58 private key
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active October 19, 2025 03:29
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@mraaroncruz
mraaroncruz / steps.md
Last active October 22, 2025 18:43
Get the Telegram channel ID

To get the channel id

  1. Create your bot with botfather
  2. Make you bot an admin of your channel

Simplest way (via @anhtuank7c)

Go to Telegram web and open a channel, get the ID from -[channel id] from hash in the path

https://web.telegram.org/k/#-9999999999999

@yidas
yidas / codeiginter-server-config.md
Last active March 8, 2025 15:25
Codeigniter 3 server configuration for Nginx & Apache

Codeigniter 3 server configuration for Nginx & Apache

Web Server Site Configuration

Recommended Apache Configuration

Use the following configuration in Apache's httpd.conf file or within a virtual host configuration. Note that you should set DocumentRoot and ServerName fit to your environment:

@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active October 28, 2025 10:45
crack activate Office on mac with license file
@kentbrew
kentbrew / finding_twitter_user_id.md
Last active August 14, 2025 11:47
Finding Twitter User IDs

Finding Twitter User IDs

User accounts on Twitter are commonly identified by screen name, which may be changed by operators when they take over an account, or have been sitting on an old account for a long time and want to transition it into malicious use.

User IDs, however, are permanent. There are several services out there that will try to find them for you but it seems like a bad idea to me, since you're alerting them to the fact that there's something interesting about this account. There's also plenty of bad advice that uses many long-since-abandoned Twitter API endpoints.

As of this writing (2018-02-18) you can view source and search for /profile_banners/, which will show something like this:

.enhanced-mini-profile .mini-profile .profile-summary {
@jeffochoa
jeffochoa / Response.php
Last active October 6, 2025 22:11
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@jpwilliams
jpwilliams / tree.md
Last active May 7, 2025 19:39
Tree using .gitignore

Uses tree along with a .gitignore file to filter results. Defaults to ignoring node_modules if no .gitignore can be found in the current directory or in the git repo's root directory.

Would be cooler if we knew exacty where .gitignore files made a difference. Even nicer if the output showed the status of files in Git (modified, unchanged, new, deleted etc).

Package?

@mapleobserver
mapleobserver / wordpress-hide-wordpress-vesion.php
Created May 8, 2014 09:36
隐藏 Wordpress 版本信息
//将下列代码添加到当前主题的 functions.php 中
// 同时删除 head 和 feed 中的 WP 版本号
function ludou_remove_wp_version() {
return '';
}
add_filter('the_generator', 'ludou_remove_wp_version');
// 隐藏 js/css 附加的 WP 版本号
function ludou_remove_wp_version_strings( $src ) {
global $wp_version;
parse_str(parse_url($src, PHP_URL_QUERY), $query);