Skip to content

Instantly share code, notes, and snippets.

View mrousavy's full-sized avatar
🐍
slime season

Marc Rousavy mrousavy

🐍
slime season
View GitHub Profile
@rxaviers
rxaviers / gist:7360908
Last active June 21, 2024 05:10
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:
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
Well, I suppose its `safe' to release this, it seems everyone and their dog has
it and apparantly (and to my surprise) it still works.
The `smurf' attack is quite simple. It has a list of broadcast addresses which
it stores into an array, and sends a spoofed icmp echo request to each of those
addresses in series and starts again. The result is a devistating attack upon
the spoofed ip with, depending on the amount of broadcast addresses used,
many, many computers responding to the echo request.
Before I continue may I first say that this code was a mistake. When it was
@maciekish
maciekish / resetXcode.sh
Created August 10, 2016 10:13
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app
@mrousavy
mrousavy / GetScreenshot.cs
Created January 9, 2017 15:22
Get Image from whole screen (BitmapSource)
public class GetScreenshot{
public static BitmapSource GetScreen(Rectangle coordinates) {
int left = coordinates.Left;
int top = coordinates.Top;
int width = coordinates.Width;
int height = coordinates.Height;
using(var screenBmp = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)) {
using(var bmpGraphics = Graphics.FromImage(screenBmp)) {
@mrousavy
mrousavy / Loom.cs
Created January 23, 2017 12:53
XYZ Loom for Unity 3D/2D
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Threading;
using System.Linq;
[ExecuteInEditMode]
/// <summary>
/// Multithreading support

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone git@gist.github.com:<hash>.git     # or with ssh
@danielpi
danielpi / OSTypedEnum.swift
Created March 27, 2017 13:29
Extension to AVCaptureVideoDataOutput and an enum to represent OSType CVPixelFormatType data
extension AVCaptureVideoDataOutput {
var availableVideoCVPixelFormatTypedEnums: [OSTypedEnum] {
let availablePixelFormatDescriptions: Array<OSType> = self.availableVideoCVPixelFormatTypes as! Array<OSType>
let availablePixelFormats: Array<OSTypedEnum> = availablePixelFormatDescriptions.map { OSTypedEnum(rawValue: $0)! }
return availablePixelFormats
}
}
enum OSTypedEnum: OSType {
case monochrome1 = 1
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active June 16, 2024 11:03
React Native Bridging Cheatsheet
@mrousavy
mrousavy / AnimationExtensions.cs
Created August 21, 2017 10:23
Useful async extensions for WPF UIElements/Animatable for animating with ease
using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Animation;
namespace mrousavy {
public static class AnimationExtensions {
/// <summary>
/// Animate a given <see cref="UIElement" />/<see cref="System.Windows.Controls.Control" /> asynchronous (awaitable)
/// </summary>