Skip to content

Instantly share code, notes, and snippets.

@sataniceypz
sataniceypz / alive.js
Last active May 5, 2024 13:05 — forked from Kingbadan321/alive.js
Custom Alive For Izumi-xd
const { command, isPrivate, getBuffer } = require("../lib/");
const config = require("../config");
// Edit here πŸ‘‡πŸΏπŸŒΈ
let title = "π—œπ—­π—¨π— π—œ-𝗫𝗗"
let body = "π—›π—²π˜† π—œπ˜‡π˜‚π—Ίπ—Ά π—Άπ˜€ π—”π—Ήπ—Άπ˜ƒπ—²πŸ§šβ€β™‚οΈ"
let sourceUrl = "github.com/sataniceypz/Izumi-v2"
let mediaUrl = "github.com/sataniceypz/Izumi-v2"
let mediaType = 1
@banksean
banksean / mersenne-twister.js
Created February 10, 2010 16:24
a Mersenne Twister implementation in javascript. Makes up for Math.random() not letting you specify a seed value.
/*
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace
so it's better encapsulated. Now you can have multiple random number generators
and they won't stomp all over eachother's state.
If you want to use this as a substitute for Math.random(), use the random()
method like so:
var m = new MersenneTwister();
@janoliver
janoliver / tutorial.md
Last active May 5, 2024 13:00
Arch Linux as a Web Server

In this tutorial, I briefly explain how to set up a webserver using nginx, openssl and uwsgi on Arch Linux. The tutorial is applicable to other Linux distributions and goes through the required configuration step by step. It is, I believe, beginner friendly.

0. Version

I updated, changed and tested the tutorial on Dec. 8th, 2013. All commands and configuration files relate to the software versions that are currently available in the Arch package repositories. Especially nginx and uwsgi change often and

@devomman
devomman / office-activation.md
Created May 30, 2023 11:01
Office Activation Command by Omman

Office 2021

Method 1: Using my command line

Step 1.1: Open cmd program with administrator rights.

  • First, you need to open cmd in the admin mode, then run all commands below one by one.

Step 1.2: Get into the Office directory in cmd.

  • For x86 and x64
cd /d %ProgramFiles(x86)%\Microsoft Office\Office16
cd /d %ProgramFiles%\Microsoft Office\Office16
@tatsumoto-ren
tatsumoto-ren / subs.md
Last active May 5, 2024 12:59
Japanese Subtitles
@alexras
alexras / img_resize.py
Last active May 5, 2024 12:58
Nearest-neighbor image scaling with PIL
#!/usr/bin/env python
from PIL import Image
import sys
im = Image.open(sys.argv[1])
def scale_to_width(dimensions, width):
height = (width * dimensions[1]) / dimensions[0]
@rxaviers
rxaviers / gist:7360908
Last active May 5, 2024 12:57
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:
@dduan
dduan / runCommand.swift
Last active May 5, 2024 12:55
How to fork()+execv() in Swift
import Foundation
func withCStrings(_ strings: [String], scoped: ([UnsafeMutablePointer<CChar>?]) throws -> Void) rethrows {
let cStrings = strings.map { strdup($0) }
try scoped(cStrings + [nil])
cStrings.forEach { free($0) }
}
enum RunCommandError: Error {
case WaitPIDError
@mehdico
mehdico / FilterHelper.java
Created October 7, 2019 08:02
setFilter deprecated solution, it work's on all api versions.
import android.graphics.BlendMode;
import android.graphics.BlendModeColorFilter;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
public class FilterHelper {
public enum Mode {
CLEAR,
@jjvillavicencio
jjvillavicencio / setup.sh
Last active May 5, 2024 12:53
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin