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
@julienrf
julienrf / fb-page-feed.js
Created November 29, 2010 11:06
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 + '" />');
@rossant
rossant / raytracing.py
Last active June 25, 2024 20:58
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
@pkuczynski
pkuczynski / parse_yaml.sh
Last active July 9, 2024 04:42
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]}}
@melvincabatuan
melvincabatuan / BOOSTwithPython3
Created April 5, 2015 10:47
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
@alirobe
alirobe / reclaimWindows10.ps1
Last active July 3, 2024 09:36
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.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
<Name>IDM Full ToolKit</Name>
<Version>4.7</Version>
<Download>https://onedrive.live.com/download?cid=860C6C270D0296DF&resid=860C6C270D0296DF%21175&authkey=APaTYii-uJSRpD0</Download>
link khác:
https://uploading.vn/vtyktzy6ukao
https://veryfiles.com/apcik7jdp3wz
[IDM Toolbar]
<URL>https://drive.google.com/uc?export=download&id=0B3sqdC3gTItxWDNubEFCZEI0RkE</URL>
@codediodeio
codediodeio / database.rules.json
Last active July 24, 2024 21:05
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@Gydo194
Gydo194 / Server.cpp
Last active May 21, 2024 08:18
C++ Event driven TCP socket server (multi client, single threaded)
/*
* Server.cpp
*
* EventServer is a simple C++ TCP socket server implementation,
* to serve as an example to anyone who wants to learn it.
* It can interface with the rest of your program using three callback functions.
* - onConnect, which fires when a new client connects. the client's fd is passed.
* - onDisconnect, which fires when a client disconnects. passes fd.
* - onInput, fires when input is received from a client. passes fd and char*
*
@silverwolfceh
silverwolfceh / fbshield.py
Last active November 7, 2020 01:21
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