Skip to content

Instantly share code, notes, and snippets.

@sarahcssiqueira
sarahcssiqueira / .phpcs.xml
Created August 3, 2023 23:18
Workaround to handle PSR-4 && WordPress Coding Standards at same time
<?xml version="1.0"?>
<ruleset name="CS">
<description>PHPCS example</description>
<config name="testVersion" value="5.6-"/>
<exclude-pattern>vendor/*</exclude-pattern>
<arg value="ps"/>
<arg name="colors"/>
<arg name="parallel" value="100"/>
<arg name="extensions" value="php"/>
@sourceperl
sourceperl / main.c
Last active May 2, 2024 20:43
Test code MSP430 I2C LCD
#include <msp430g2211.h>
#define I2C_SDA BIT0 // Serial Data line
#define I2C_SCL BIT6 // Serial Clock line
/* A crude delay function. Tune by changing the counter value. */
void delay( unsigned int n ) {
volatile int i;
for( ; n; n-- ) {
@rxaviers
rxaviers / gist:7360908
Last active May 2, 2024 20:42
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:

TL;DR

When Riot Games introduces the Vanguard anti-cheat to League of Legends, you should STOP playing and you should not install the anti-cheat when you get the pop-up. Vanguard is a kernel-level anticheat and these anticheats operate at a privilege level HIGHER THAN YOUR OWN. The anti-cheat can do things that even you can't do, without asking or letting you know. It's like Riot installing a camera in every room of your house and getting a copy of every key inside.

Here is just one example of what they can do: https://www.theregister.com/2013/11/20/esea_gaming_bitcoin_fine/

https://www.wired.com/2013/11/e-sports/

Who am I?

@leogdion
leogdion / serialNumber.swift
Created October 18, 2016 14:25
How To Get A Serial Number on macOS in Swift
var serialNumber: String? {
let platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice") )
guard platformExpert > 0 else {
return nil
}
guard let serialNumber = (IORegistryEntryCreateCFProperty(platformExpert, kIOPlatformSerialNumberKey as CFString, kCFAllocatorDefault, 0).takeUnretainedValue() as? String)?.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) else {
return nil
}
@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
@aidos-dev
aidos-dev / README.md
Last active May 2, 2024 20:36
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@parmentf
parmentf / ConventionalCommitsEmoji.md
Last active May 2, 2024 20:36
Emoji for Conventional Commits
Type Emoji code
feat ✨ :sparkles:
fix πŸ› :bug:
docs πŸ“š :books:
style πŸ’Ž :gem:
refactor πŸ”¨ :hammer:
perf πŸš€ :rocket:
test 🚨 :rotating_light:
build πŸ“¦ :package:
@0xjac
0xjac / private_fork.md
Last active May 2, 2024 20:35
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@parmentf
parmentf / GitCommitEmoji.md
Last active May 2, 2024 20:29
Git Commit message Emoji

Inspired by dannyfritz/commit-message-emoji

See also gitmoji.

Commit type Emoji
Initial commit πŸŽ‰ :tada:
Version tag πŸ”– :bookmark:
New feature ✨ :sparkles:
Bugfix πŸ› :bug: