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 / cpp_std_async.cpp
Created September 30, 2019 03:19
C++ STD Asynchronous
#include <iostream>
#include <vector>
#include <future>
int main(int argc, char const *argv[])
{
auto fn_sync = [](int v)
{
std::cout << v << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(1));
@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 / cwhm.py
Created October 25, 2019 18:15
Calculate working hours in a month
# Calculate working hours in a month
# Pretty
def F(M, Y):
import calendar
def f(b, i, d, n):
@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