Skip to content

Instantly share code, notes, and snippets.

View vic4key's full-sized avatar
✔️
Hi, I'm Vic P.

Vic P. vic4key

✔️
Hi, I'm Vic P.
View GitHub Profile
@vic4key
vic4key / fbshield.py
Created September 4, 2018 15:03 — forked from silverwolfceh/fbshield.py
Turn on or off facebook shield (profile picture guard)
import requests
import json
USER_TOKEN = "" #Fill your fb user token (open https://facebook.com/me, ctrl +u and copy access token
SHIELD_ENABLE = "true" #Change to false if turn off shield
def get_userid(token):
url = "https://graph.facebook.com/me?access_token=%s" % token
@vic4key
vic4key / fb-page-feed.js
Created June 17, 2019 18:42 — forked from julienrf/fb-page-feed.js
A small js snippet retrieving the feed of a Facebook page and displaying its elements.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<script src="http://connect.facebook.net/fr_FR/all.js"></script>
<script>
// Replace the id by any other public page id
FB.api('170913076256527/feed', { limit: 3 }, function(result) {
$('#fb-feed').empty();
$(result.data).each(function(i, post) {
entry = $('<div class="fb-item"></div>');
if (post.icon) {
entry.append('<img class="icon" src="' + post.icon + '" />');
@vic4key
vic4key / parse_yaml.sh
Created August 16, 2019 18:20 — forked from pkuczynski/parse_yaml.sh
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}
@vic4key
vic4key / python.md
Created October 21, 2019 15:30 — forked from RobertAKARobin/python.md
Python Is Not A Great Programming Language

Python is not a great programming language

Let me start off by saying what is nice about Python:

  • The philosophy of "one correct way to do things."
  • Easy to learn (at the start).
  • Pretty complete standard libraries.
  • A huge ecosystem of good third-party libraries.
  • Forced indentation. It's a mixed bag, but I've worked with too many junior developers who would never have indented otherwise.
  • The import system makes it easy to trace the filepath for any dependency.
@vic4key
vic4key / python.md
Created October 21, 2019 15:30 — forked from RobertAKARobin/python.md
Python Is Not A Great Programming Language

Python is not a great programming language

Let me start off by saying what is nice about Python:

  • The philosophy of "one correct way to do things."
  • Easy to learn (at the start).
  • Pretty complete standard libraries.
  • A huge ecosystem of good third-party libraries.
  • Forced indentation. It's a mixed bag, but I've worked with too many junior developers who would never have indented otherwise.
  • The import system makes it easy to trace the filepath for any dependency.
@vic4key
vic4key / reclaimWindows10.ps1
Created January 28, 2020 05:49 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@vic4key
vic4key / BOOSTwithPython3
Created February 21, 2020 17:47 — forked from melvincabatuan/BOOSTwithPython3
Compile BOOST with Python3 support
1. Check Python3 root
>>> import sys
>>> import os
>>> sys.executable
'/usr/local/bin/python3'
OR
$ which python3
/usr/local/bin/python3
@vic4key
vic4key / database.rules.json
Created December 19, 2020 20:26 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@vic4key
vic4key / raytracing.py
Created April 11, 2021 19:58 — forked from rossant/raytracing.py
Very simple ray tracing engine in (almost) pure Python. Depends on NumPy and Matplotlib. Diffuse and specular lighting, simple shadows, reflections, no refraction. Purely sequential algorithm, slow execution.
"""
MIT License
Copyright (c) 2017 Cyrille Rossant
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is